Topic5-Introduction To Loop and Using Loop For - ASSIGNMENT1
Topic5-Introduction To Loop and Using Loop For - ASSIGNMENT1
11
Assignment (part 1)
Loop exercises: Write a C program to …
7. Display the words “Hi” 20 times and then “bye” 10 time using For loop. One line for
displaying the word “Hi”, and another line for displaying the word “bye”.
8. Display all even numbers between 0 to 30.
9. Calculate factorial of integer number n, where n is a positive number entered by a user.
10. Write an algorithm to sum suite number from 1 to n, where n is a positive number
entered by a user.
12