Advertisement
dzieciol

8.5.1

Jan 26th, 2015
553
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3.  
  4. using namespace std;
  5.  
  6. int main(int argc, char *argv[])
  7. {
  8.     cout<<"podaj wielkość tablicy";
  9.     int n,i;
  10.    
  11.     cin>>n;
  12.     int tab[n];
  13.     cout<<"podaj "<<n<<"elementow tablicy"<<endl;
  14.     for (i=1 ; i<=n ; i++){
  15.     cin>> tab[i];
  16.     cout<<endl;}
  17.     for (i=2;i<=n ; i=i+2)
  18.     cout<<tab[i]<<endl;
  19.    
  20.    
  21.   system("PAUSE"); 
  22.   return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement