ICT-Presentation ForLoops
ICT-Presentation ForLoops
P R E S E N T A T I O N B Y : C H A R L E S T U A Z O N
INTRODUCTION
for(initialization;condition;operation){}
Be aware.
FOR loops vs WHILE loops
PRACTICE:
1. Create a program that uses FOR LOOP that counts from 15 and back
to 5.
Incase that you can't read,
Sample output:
you cannot use while and
15
do/while loops
14
10
You may modify the
9
program's running
8 window aesthethics.
7
6
5
CHALLENGE:
2. Create a program that uses FOR LOOP that gets an integer from
user input then from that integer, it should count up/down to 9.
8 10
9 9
You may use the break; Incase that you can't You may modify the
and if-statements read, you cannot use program's running
while and do/while
loops window aesthethics.
THANK YOU
P R E S E N T A T I O N B Y : C H A R L E S T U A Z O N