Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.03 KB | None | 0 0
  1. //ALEX ENACHE
  2.  
  3. #include <algorithm>
  4. #include <vector>
  5.  
  6. using namespace std;
  7.  
  8. //#include <iostream>
  9. #include <fstream>
  10. ifstream cin ("input");ofstream cout ("output");
  11.  
  12. void sum (int &a , int b){
  13.     a = a + b;
  14. }
  15.  
  16. int main() {
  17.  
  18.     /*int x = 2 , y = 3;
  19.     sum(x , y);
  20.     cout<<x;*/
  21.  
  22.     //freopen("input", "r", stdin);freopen("output", "w", stdout);
  23.  
  24.     //int n; // val max = 2147483647
  25.     //long long n;
  26.     //float n; //sau double
  27.     //char n;
  28.  
  29.     /*string s;
  30.     cin>>s;
  31.  
  32.     string aux;
  33.     cin>>aux;
  34.  
  35.     string now = s + '#' + aux;
  36.  
  37.     cout<<now;*/
  38.  
  39.     //vector < int > a(100); -> vector de marime 100
  40.     //vector < int > a[100]; -> 100 de vectori
  41.  
  42.     vector < int > a;
  43.  
  44.     //a.resize(100);
  45.     a.push_back(1);
  46.     a.push_back(2);
  47.     a.push_back(3);
  48.  
  49.     /*cout<<a[2]<<'\n'; //1 2 3
  50.     a.pop_back(); //1 2
  51.     a.push_back(4); //1 2 4
  52.     cout<<a[2]<<'\n';*/
  53.  
  54.     for (auto &x : a){
  55.         x = 0;
  56.     }
  57.     for (auto x : a){
  58.         cout<<x<<" ";
  59.     }
  60.  
  61.  
  62.  
  63.  
  64.     return 0;
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement