Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //https://en.cppreference.com/w/cpp/container
- //http://www.cplusplus.com/reference/vector/vector/?kw=vector
- #include<bits/stdc++.h>
- #include<vector>
- using namespace std;
- int main()
- {
- vector <int> vec/*size bole dile first bracket a dite hoy then input vec[1]=value dite hoy.size bole dile same array hoye jay.for loop diye array er moto nite hoy input*/(5);
- vec.push_back(1);
- vec.push_back(3);
- vec.push_back(6);
- vec.push_back(8);
- vec.push_back(11);
- vec.push_back(18);
- int a=vec.size();
- for(int i=0;i<a;i++){
- cout<<vec[i]<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment