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