Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main() {
- int a, n ;
- scanf("%d %d", &a, &n);
- while(n <= 0)
- scanf("%d", &n);
- int i, plus = 0 ;
- for(i=a; i<n+a; i++)
- plus += i ;
- printf("%d\n", plus);
- return 0 ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement