Knowledge Unit of Science and Technology: Laboratory Manual (CC1021) : (Programming Fundamentals) (Semester Fall-2021)
Knowledge Unit of Science and Technology: Laboratory Manual (CC1021) : (Programming Fundamentals) (Semester Fall-2021)
Loops
In the programming world, the loop is a control structure that is used when we want to execute a
block of code, multiple times. It usually continues to run until and unless some end condition is
fulfilled.
Without Loops:
For Loop
While Loop
Do While Loop
For Loop
Syntax
for ( init; condition; increment )
{
statement(s);
}
Example
Lab Task:
Grade Description
E Excellent
V Very Good
G Good
A Average
F Fail
Test Data :
Input the grade :A
Expected Output :
You have chosen : Average