//#include #include #include #include #include #include #include #include #include using namespace std; void izpisi(vector v) { for (int x : v) cout << x << " "; cout << endl; } vector podvoji(vector &v) { int n=v.size(); for (int i=0;i a = {9,3,2,11,4}; cout << *min_element(a.begin(), a.end()) << endl; sort(a.begin(),a.end()); izpisi(a); sort(a.begin(),a.end(), [](int x, int y) { return to_string(x) < to_string(y); }); izpisi(a); int x=12; int &y=x; x=3; cout << x << " " << y << endl; vector a = {1,2,3}; vector b = podvoji(a); izpisi(a); izpisi(b); map vpisna = {{"Ana",123},{"Miha",456},{"Jure",789}}; vpisna["Teja"]=321; cout << vpisna["Joze"] << endl; cout << vpisna["Ana"] << endl; vector> koord = {{2,3},{-4,7},{1,1}}; for (auto [x,y] : koord) { cout << x << " " << y << endl; } vector v; for (int i=1;i<=1024;i*=2) v.push_back(i); //for (int i=0;i::iterator it=v.begin()+3; for (auto it=v.begin()+3; it!=v.end(); it++) { cout << *it << endl; } for (int x : v) cout << x << endl; pair koord(4,5); cout << koord.first << " " << koord.second << endl; koord = make_pair(2,3); cout << koord.first << " " << koord.second << endl; array a = {1,2,3}; //a[0]=3; a[1]=6; a[2]=9; cout << a[1] << endl; pair, int> ocena = {{"Janez","Novak"}, 10}; auto ocena2 = ocena; cout << ocena2.first.first << endl; string ime, priimek; cin >> ime >> priimek; cout << "Pozdravljen, " << ime + " " + priimek << endl; cout << ime.size() << endl; cout << ime[0] << priimek[0] << endl; int a,b; //scanf("%d%d",&a,&b); //printf("%d\n",a+b); std::cout << "Zivjo!" << '\n'; cin >> a >> b; cout << "vsota = " << a+b << endl; */ return 0; }