Advertisement
Guest User

Untitled

a guest
Mar 29th, 2020
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <cstdio>
  4. #include <ctime>
  5.  
  6. using namespace std;
  7.  
  8.  
  9. int main ()
  10. {
  11. int tab2[3][4];
  12. int i,j;
  13. int najwiekszaliczba=tab2[0][0];
  14. srand(time(NULL));
  15.  
  16. for(i=0;i<3;i++)
  17. {
  18. for(j=0;j<4;j++)
  19. {
  20. tab2[i][j]=rand()% 50+10 ;
  21. if(najwiekszaliczba>tab2[i][j])
  22. {
  23. najwiekszaliczba=tab2[i][j];
  24. }
  25.  
  26.  
  27. }
  28. }
  29. for (i=0;i<3;i++)
  30. {
  31. cout<<endl;
  32. for(j=0;j<4;j++)
  33. {
  34. cout<<tab2[i][j]<<"\t";
  35.  
  36. }
  37. }
  38. {
  39. cout << ""<<endl<<endl;
  40.  
  41. cout<<najwiekszaliczba<<endl;
  42.  
  43.  
  44. }
  45.  
  46. return 0;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement