Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int rows = 3;
- int cols = 3;
- float **arr = new float* [rows];
- for (int i = 0; i < rows; i++)
- arr[i] = new float[cols];
- cout << "TASK 16\nВведите по " << cols << " элемента(ов) в каждой строке\n";
- for (int i = 0; i < rows; i++) {
- cout << "строка: " << i + 1 << " из " << rows << endl;
- for (int j = 0 ; j < cols; j++)
- cin >> arr[i][j];
- }
- for (int i = 0; i < rows; i++) {
- for (int j = 0 ; j < cols; j++)
- cout << arr[i][j] << ' ';
- cout << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement