fork download
  1.  
  2. #include <iostream>
  3.  
  4. #include <iomanip>
  5.  
  6. #include <conio.h>
  7.  
  8. #include <math.h>
  9.  
  10. using namespace std;
  11.  
  12. int main()
  13.  
  14. {
  15.  
  16. const int n = 5, m = 6;
  17.  
  18. int a[n][m] = {{1, 2, -3, 4, 5, 6},
  19.  
  20. {3, 0, 3, 3, 3, 2},
  21.  
  22. {1, -12, 1, 4, 5, 8},
  23.  
  24. {1, 7, 8, -1, 2, -3},
  25.  
  26. {2, 2, 2, 2, 2, 15}};
  27.  
  28. int i, j;
  29.  
  30. for (i = 0; i < n; i++)
  31.  
  32. {
  33.  
  34. for (j = 0; j < m; j++)
  35.  
  36. cout << setw(4) << a[i][j];
  37.  
  38. cout << endl;
  39.  
  40. }
  41.  
  42. //Определить количество строк, не содержащих ни одного нулевого элемента;
  43.  
  44. bool bl;
  45.  
  46. int kol = 0;
  47.  
  48. for (i = 0; i < n; i++)
  49.  
  50. {
  51.  
  52. bl = true;
  53.  
  54. for (j = 0; j < m; j++)
  55.  
  56. if (a[i][j] == 0) { bl = false; break;}
  57.  
  58. if(bl) kol++;
  59.  
  60. }
  61.  
  62. if(kol) cout << "Kol string: " << kol << endl;
  63.  
  64. else cout << "String not" << endl;
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:6:19: fatal error: conio.h: No such file or directory
 #include <conio.h>
                   ^
compilation terminated.
stdout
Standard output is empty