Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main() {
- int a, n = 0, sum = 0;
- cin >> a;
- while(n <= 0){
- cin >> n;
- }
- for(int i = a; i < a+n; i++){
- sum += i;
- }
- cout << sum << "\n";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement