Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <algorithm>
- int main() {
- std::vector<int> wektor{ 1, 2, 3, 4, 5 };
- //for (auto i{ wektor.begin() }; i != wektor.end(); ++i) { // for (auto i : wektor)
- // std::cout << *i << std::endl;
- //}
- /*auto wypisanie{ [](int x) {std::cout << x << std::endl; } };
- std::for_each(wektor.begin(), wektor.end(), wypisanie);*/
- auto x{ 3 };
- if (x == 3) {
- std::cout << "trzy\n";
- }
- else {
- std::cout << "inna liczba\n";
- }
- std::cout << (x == 3 ? "trzy" : "inna liczba") << std::endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement