Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <ctime>
- #include <cstdlib>
- using namespace std;
- int tab5x5[5][5];
- int main()
- {
- srand(time(NULL));
- for(int i=0;i<5;i++)
- {
- for(int j=0;j<5;j++)
- {
- tab5x5[i][i]=rand() % 100;
- }
- }
- cout<<tab5x5[0][0]<<tab5x5[1][0]<<tab5x5[2][0]<<tab5x5[3][0]<<tab5x5[4][0]<<endl;
- cout<<tab5x5[0][1]<<tab5x5[1][1]<<tab5x5[2][1]<<tab5x5[3][1]<<tab5x5[4][1]<<endl;
- cout<<tab5x5[0][2]<<tab5x5[1][2]<<tab5x5[2][2]<<tab5x5[3][2]<<tab5x5[4][2]<<endl;
- cout<<tab5x5[0][3]<<tab5x5[1][3]<<tab5x5[2][3]<<tab5x5[3][3]<<tab5x5[4][3]<<endl;
- cout<<tab5x5[0][4]<<tab5x5[1][4]<<tab5x5[2][4]<<tab5x5[3][4]<<tab5x5[4][4]<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement