2079 3

C Programming207910 marksComparison of while and do while

When do we use for loop and while loop? Compare the while and do while loop with suitable example.Write a program to find average, minimum and maximum age in a class of 20 students.[4+6]

When do we use for loop and while loop? Compare the while and do while loop with suitable example.Write a program to find average, minimum and maximum age in a class of 20 students.[4+6]

--- Use a for loop when: - The number of iterations is known in advance - You have a clear initialization, condition, and increment/decrement - Iterating over arrays, ranges, or fixed counts Example: Use a while loop when: - The number of iterations is not known in advance - The loop continues ba...

Up nextWhat do you mean by flowchart? Draw a Flowchart to find the largest among three numbers en