Advertisement
Vlad5080

Untitled

Jan 25th, 2020
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. void ex2() {
  2. int a, b, m, n, k = 0;
  3.  
  4. cout << "Кол-во элементов \n ->";
  5. cin >> m >> n;
  6. int** arr = new int*[m];
  7.  
  8. for (int i = 0; i < n; i++) {
  9. arr[i] = new int[n];
  10. }
  11. cout << " элементы \n ->";
  12.  
  13. for (int i = 0; i < n; i++) {
  14. for (int j = 0; j < m; j++) {
  15. cin >> arr[i][j];
  16. }
  17. }
  18. cout << "Ваш массив :" << endl;
  19. for (int i = 0; i < n; i++) {
  20. for (int j = 0; j < m; j++) {
  21. cout << arr[i][j] << " ";
  22. }
  23. cout << endl;
  24. }
  25.  
  26. for (int i = 0; i < n; i++) {
  27. for (int j = 0; j < n; j++) {
  28. if (arr[i][j]){
  29.  
  30. }
  31. }
  32. }
  33.  
  34.  
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement