Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- cout << "Ilosc kolumn" << endl;
- int y;
- cin >> y;
- cout <<"Ilosc wierszy"<<endl;
- int x;
- cin>>x;
- double tab[x][y];
- cout << "Wypelnij tablice od lewej do prawej"<< endl;
- for (int i=0;i<x;i++)
- {
- for (int z=0;z<y;z++)
- {
- cout << "Podaj " << i+1 << " kolumna " << z+1 << " wiersz" << endl;
- cin >> tab[i][z];
- }
- }
- int i=0;
- int z=0;
- do
- {
- cout << tab[z][i] << " ";
- i++;
- if (i==y)
- {
- cout << tab[i][y] << endl;
- i=0;
- z++;
- }
- }
- while (i<y&&z<x);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement