C++ · ОСНОВЫ · LESSON 18
Each element
range for · about 12 minutes
Learning with progressRead the summary for free. To save the work, log in to the account.
Type the code yourself
Manually type the program from the sample. So you'll remember commands and brackets.
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> nums = {2, 4};
for (int number : nums) {
cout << number << endl;
}
return 0;
}Open the editor for class workSolve it yourself
Создай vector<int> coins из 1, 3, 5. Через range for с переменной coin выведи все числа.
The answer is hidden. Use similar examples from the lesson notes.
Opening up your homework