English
Tamil Nadu Board of Secondary EducationHSC Science Class 12

Explain concepts of for loop with example. - Computer Applications

Advertisements
Advertisements

Question

Explain concepts of for loop with example.

Answer in Brief

Solution

For loop is an important functional looping system which is used for iteration logic when the programmer knows in advance how many times the loop should run.


Flowchart of For loop Structure and Flow chart

Syntax-

for (init counter; test counter; increment counter)
{
code to be executed;
>

Example:

<?php
for ($i = 0; $i<= 10; $i++)
{
echo “The number is: $i<br>”;
}
?>
shaalaa.com
Looping Structure
  Is there an error in this question or solution?
Chapter 7: Looping Structure - Evaluation - PART – IV [Page 118]

APPEARS IN

Samacheer Kalvi Computer Applications [English] Class 12 TN Board
Chapter 7 Looping Structure
Evaluation - PART – IV | Q 4. | Page 118
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×