Advertisement
Polnochniy

Untitled

Nov 21st, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std;
  4. const int N = 5;
  5. const int P = 5;
  6. int main()
  7. {
  8. setlocale(LC_ALL, "Rus");
  9. int a[N][P],min;
  10. cout << "Введите элементы массива ." << endl;
  11. for (int i = 0; i < N; i++)
  12. {
  13.  
  14. for (int j = 0; j < P; j++)
  15. {
  16.  
  17. cin >> a[i][j] ;
  18. }
  19. cout << endl;
  20. }
  21. min = a[0][0];
  22. for(int i = 1; i<N; i++)
  23. {
  24. for (int j = 0; j < P; j++)
  25. if (min > a[i][j])
  26. {
  27. min = a[i][j];
  28. }
  29. }
  30. cout << "Min: " << min << endl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement