Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main()
- {
- int tab[5][6];
- cout<<"przed transpozycja: ";
- for(int i=0;i<6;i++)
- {
- for(int j=0;j<5;j++)
- {
- tab[i][j] =rand()%10;
- cout<<tab[i][j]<<" ";
- }
- cout<<endl;
- }
- //transpozycja macierzy
- cout<<"Po transpozycji: "<<endl;
- for(int i=0;i<5;i++)
- {
- for(int j=0;j<6;j++)
- if( tab[j][i]%2==0 && tab[j][i]!=0)
- cout<<tab[j][i]+1<<" ";
- else
- cout<<"x"<<" ";
- cout<<endl;
- }
- system("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement