Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int const n = 11;
- int k = 6;
- double mas[n][n];
- for (int i = 0; i < n; i++)
- for (int j = 0; j < n; j++)
- //cin >> mas[i][j];
- mas[i][j] = rand() % 1000 / 100.0;
- cout << "mas:" << endl;
- for (int i = 0; i < n; i++) {
- for (int j = 0; j < n; j++) {
- cout << mas[i][j] << "\t";
- }
- cout << endl;
- }
- {
- for (int i = 0; i < 5; i++)
- {
- for (int j = k; j < 11; j++){
- mas[i][j] = 1;
- }
- k++;
- }
- }
- cout << "New mas" << endl;
- for (int i = 0; i < n; i++) {
- for (int j = 0; j < n; j++) {
- cout << mas[i][j] << "\t";
- }
- cout << endl;
- }
- return 0;
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement