Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- setlocale(LC_ALL, "ru");
- int count;
- cout << "Введите число: ";
- cin >> count;
- int result = 0;
- for (int i = 0; i < count; i++) {
- result += 15 + i * 2;
- }
- cout << result << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment