Statement of Control Looping on The C/C++ Programming

in #utopian-io7 years ago (edited)

Repetition or in other terms is called a loop. Repeating a process is an action that many found in programming. In all programming languages, it repeats the work process with a mechanism called a loop. Using loops, a repeating process that displays the same posts can be implemented with short program code.

Statement of Control Looping on The C/C++ Programming

FOR
WHILE
DO-WHILE

Requirements
Dev C++ 5

Number 1

for (initialization; condition; changes)
{
The statement;
}

int main ()
{
printf("\n \n utopian-io");
int i;
for(i=1;i<=10;i++)

{
    printf ("\n \n the usage FOR practical work By Steemcom");
    printf (" %d\t \n\n", i);
}
return 0;

}

Screenshot 2.jpg

work result
Screenshot 1.jpg

Initialization;
While (condition)
{
statement;
Change;
}

Number 2

int main()
{
printf("\n \n utopian-io");
int i;
i=1;
while(i<=10)
{
printf("\n \n Practical Usage WHILE By Steemcom ");
printf("%d\t",i);
i=i+1;
}
return 0;
}

Screenshot 3.jpg

work result
Screenshot 4.png

Initialization;
do {
statement;
change;
} while (condition);

Number 3

int main ()
{
printf("\n \n utopian-io");
int i;
i=1;
do
{
printf("\n \n Practical use of DO-WHILE By Steemcom ");
printf("%\t",i);
i=i+1;
}while(i<=10);
return 0;
}

Screenshot 5.jpg

work result
Screenshot 6.png

Finish
Happy Trying Good Luck



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Your contribution cannot be approved because it does not follow the Utopian Rules.