Mode:
Duration:
1
2
3
4
5
6
7
8
9
#include <iostream>
#include <vector>
#include <algorithm>
int main() {
std::vector<int> numbers = {1, 2, 3, 4, 5};
std::for_each(numbers.begin(), numbers.end(), [](int n){ std::cout << n*n << ' '; });
return 0;
}Coding works best on desktop or with an external keyboard.