FOR LOOP
Question 1..
Write a program to calculate the product of first N positive integers.
The sample output is
Enter N: 5
1 x 2 x...x 5 = 120
Use variable Product to store the result.
Question 2..
The algorithm below calculates the sum of a set of integers.
1. Declare X and Sum to be integer variables.
2. Initialize variable Sum to zero.
3. Read in a number and store it into variable X.
4. As long as the value of X is not negative, repeat steps 5 to 6:
5. Assign the value of Sum + X to variable Sum.
6. Read in a number and store it into variable X.
7. Display the value of Sum.