#include<bits/stdc++.h> using namespace std; void printvec(vector<int> v) { cout<<v.size()<<endl; for(int j=0;j<v.size();++j) { cout<<v[j]<<" "; } cout<<endl; } int main() { int i; vector<int> v; cout<<"Enter Array"<<endl; for(i=0;i<4;++i) { int k; cin>>k; v.push_back(k); printvec(v); } printvec(v); return 0; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)