
C Programming Examples – Factorial using Loop Statement
Problem: Write a program that will compute for n! (N Factorial).
Sample Output: Enter Number: 6 1 2 3 4 5 6 The factorial value is 720 Solution:

Sample Output: Enter Number: 6 1 2 3 4 5 6 The factorial value is 720 Solution:

Example Output: Enter Number: 21 0 2 4 6 8 10 12 14 16 18 20

Solution: First lets see an example output. Enter age1: 5 Enter age2: 10 Enter age3:28 Enter age4: 7 Enter age5: 5 Enter age6: 18 Enter age7: 14 Enter age8: 16 Enter age9: 19 Enter age10: 22 The average age is: … Continue reading
Recent Comments