SHARE
TWEET

Untitled

a guest Feb 21st, 2020 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     int rows = 3;
  2.     int cols = 3;
  3.     float **arr = new float* [rows];
  4.     for (int i = 0; i < rows; i++)
  5.         arr[i] = new float[cols];
  6.     cout << "TASK 16\nВведите по " << cols << " элемента(ов) в каждой строке\n";
  7.     for (int i = 0; i < rows; i++) {
  8.         cout << "строка: " << i + 1 << " из " << rows << endl;
  9.         for (int j = 0 ; j < cols; j++)
  10.             cin >> arr[i][j];
  11.     }
  12.     for (int i = 0; i < rows; i++) {
  13.         for (int j = 0 ; j < cols; j++)
  14.             cout << arr[i][j] << ' ';
  15.         cout << endl;
  16.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top