Question 2:
(1 mark, file to be edited: Q2.c)
The program asks the user to enter a positive integer N using the keyboard (STDIN).
Print the sum of the values of the numbers from 1 to N.
Here are two examples:
Case 1: Enter N = 10
10
OUTPUT:
55
Press any key to continue
-3
Case 2: Enter N = -3
Zoom
OUTPUT:
-3 is not a positive integer Press any key to continue
+ 100%
Close