More Shorthand
The statement
for (initialization; condition; increment)
statement
is shorthand for
initialization;
while ( condition )
{
statement ;
increment ;
}
Example:
for (grade=0; grade<=100; grade++)
freq[grade] = 0;
Previous slide
Next slide
Back to first slide
View graphic version