Friday, February 1, 2019

URI 1159:: SOLUTION

URI Online Judge | 1159

Sum of Consecutive Even Numbers

The program must read an integer indefinite times (stop when X=0). For each X, print the sum of five consecutive even numbers from X, including it if X is even. If the input number is 4, for example, the output must be 40, that is the result of the operation: 4+6+8+10+12. If the input number is 11, for example, the output must be 80, that is the result of 12+14+16+18+20.

Input

The input file contains many integer numbers. The last one is zero.

Output

Print the output according to the example below.
Input SampleOutput Sample
4
11
0
40
80



[WAIT]
     First of all, think yourself that you have tried enough for the problem. If you did not please read the program once. REMEMBER one thing, just believe in yourself.....YOU CAN.....YOU KNOW....



See the ANSWER here...
                                                                

No comments:

Post a Comment