Basic Program Control 1276
10:
11: for (count = 1; count <= 20; count++)
12: printf(“%d\n”, count);
13:
14: return 0;
15: }1 2 3 4 5 6 7 8 910
11
12
13
14
15
16
17
18
19
20
Figure 6.2 illustrates the operation of the forloop in Listing 6.1.LISTING6.1 continuedOUTPUTFIGURE6.2
How the forloop in
Listing 6.1 operates.Assign 1
to countIncrement
count by 1StartIs count
< = 20?DoneExecute
print()for (count = 1; count < = 20; count++)
print ( "\n%d", count);NOYES10 448201x-CH06 8/13/02 11:20 AM Page 127