Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- vector < int > v ( 5,0 );
- for ( int i=0 ; i<5 ; i++ ) v[i]=i+1;
- cout<<"Now Printing elements using the auto command : \n";
- /*for ( int i=0 ; i<5 ; i++ )
- cout<<v[i]<<' ';*/
- for ( auto i:v )
- cout<<v[i]<<" ";
- return 0;
- }
Add Comment
Please, Sign In to add comment