Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. #include <iostream>
  2. #include<cstdlib>
  3. #include<ctime>
  4. using namespace std;
  5. int n;
  6. int Tab [5][2];
  7. int main()
  8. {
  9.     srand (time(NULL));
  10.     for(int row=0;row<5;row++)
  11.     {
  12.     for (int col=0;col<2;col++)
  13.     Tab[row][col]=(rand()%10)+1;
  14.     }
  15.         for(int row=0;row<5;row++)
  16.     {
  17.     for (int col=0;col<2;col++)
  18.     cout<<Tab[row][col]<<"\t";
  19.     cout<<endl;
  20.     }
  21.         for(int row=0;row<5;row++)
  22.         int min=Tab[row][0];
  23.     {
  24.     for (int col=0;col<2;col++)
  25.     if (Tab[row][col]<min)
  26.     {
  27.     min=Tab[row][col];
  28.     }
  29.     cout<<"Najmniejsza wartosc wiersza"<<row<<"to: "<<min<<endl;
  30.     }
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement