Control Structure in C
Control Structure in C
Single alternative
● If-else condition
● if-else-if condition
4. Loops/Repetition Statements
● These are two types of repetition statements:
– pretest repetition statement
– posttest repetition statement
5. For Statement
> Sample Problem 5-6: This program displays the string “Hello World” ten times.
● Program (Sample Problem 5-6)
6. while Statement
> Sample Problem 5-7: Using while statement
● Program (Sample Problem 5-7)
~Page 24