Advertisement
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 begin = 1;
- int end = 7;
- int sum = 0;
- int i = begin;
- while (i <= end) {
- sum += i;
- i++;
- }
- cout << "Result = " << sum << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement