PRINT SERIES

Description:

Vishu has a task to solve the following series. Write a C code to find the print 1+(1+2)+ (1+2+3)+ (1+2+3+4)++n. It will help him to come out of this problem. Input: Input should contain the value of the limit n Output: It should print the above series upto n limit

Program :

  • Test Case 1

    Input (stdin)
    4
    
    

    Expected Output

    1 3 6 10
  • Test Case 2

    Input (stdin)
    10
    
    

    Expected Output

    1 3 6 10 15 21 28 36 45 55