Repetition In C / C ++ (Looping) on Programing
When it comes to repetition, what's in our minds
a repeat occurrence
but this time we discussed Repetition In C ++
From the title of the above, there will be many questions.
and here I will discuss what is the meaning of looping in C ++, what is the general form, and a simple program example that uses looping!
The answer to the first question
Repetition: The loop is a set of activities that repeats a statement to the desired extent.
The answer to the second question
General form Repetition in C ++ language there are 2 among others:
FOREIGN TROUBLE
Used to repeat a process that has known the number of iterations.
General Forms:FOREIGN TROUBLE
Used to repeat a process that has known the number of iterations.
General Forms:
for (initialization; condition; changes)
{
Statementl;
Statement2;
- WHILE looping
Used when the number of iterations is unknown.
General Forms:
while (expression)
{
Statementl;
Statement2;
}
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;
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;
}
Finish
Thank You for Reading My Artistry Hopefully Helpful
Follow Me: @steemcom
Thans
Posted on Utopian.io - Rewarding Open Source Contributors
Your contribution cannot be approved because it does not follow the Utopian Rules.
Explaining some concept is not considered a contribution to open source in
Development
category.You can contact us on Discord.
[utopian-moderator]