Advertisement
Guest User

odwracanie_tablic

a guest
Feb 26th, 2020
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.  
  8.     int p;
  9.  
  10.     cout<<"ile prob ?"<<endl;
  11.     cin>>p;
  12.     for (int i=0;i<p;i++)
  13.     {
  14.         int x;
  15.         cout<<"ile elemntow ?"<<endl;
  16.         cin>>x;
  17.            int t[x];
  18.             for (int j=0;j<x;j++)
  19.             {
  20.                 cout<<"podaj "<<j+1<<" element "<<i+1<<" tablicy"<<endl;
  21.                 cin>>t[j];
  22.             }
  23.                 for(int j=0;j<x;j++)
  24.                 {
  25.                     cout<<t[x-1-j]<<" ";
  26.  
  27.                 }
  28.     cout<<endl;
  29.     }
  30.     return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement