Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include<cstdlib>
- #include<ctime>
- using namespace std;
- int n;
- int Tab [5][2];
- int main()
- {
- srand (time(NULL));
- for(int row=0;row<5;row++)
- {
- for (int col=0;col<2;col++)
- Tab[row][col]=(rand()%10)+1;
- }
- for(int row=0;row<5;row++)
- {
- for (int col=0;col<2;col++)
- cout<<Tab[row][col]<<"\t";
- cout<<endl;
- }
- for(int row=0;row<5;row++)
- int min=Tab[row][0];
- {
- for (int col=0;col<2;col++)
- if (Tab[row][col]<min)
- {
- min=Tab[row][col];
- }
- cout<<"Najmniejsza wartosc wiersza"<<row<<"to: "<<min<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement