mhdew

1159 URI

Oct 31st, 2017
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. int main()
  4. {
  5. int x,i,sum;
  6.  
  7. for(;;){
  8. scanf("%d", &x);
  9.  
  10. if(x==0)
  11. break;
  12. else{
  13. sum=0;
  14.  
  15. if(x%2==1)
  16. x=x+1;
  17.  
  18. for(i=1;i<=5;i++){
  19. sum+=x;
  20. x+=2;
  21. }
  22. printf("%d\n", sum);
  23. }
  24. }
  25. return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment