1. Entry Control Loop.
2.)Exit Control Loop.
Q. if we need print a name in 10 times then we have 2 option first is write the printf command in 10 times and second is use loop
In C
# Include
# include
main()
{
int i;
char name[]={"abcd"};
for (i=1;i<=10;i++)
{
printf("%s",name);
}
in C++
}
We can also write through Do while and While loop
Do While Loop
Do
{
statement
}
While Loop
main()
{
i=0;
while i<=10
{
statement
i++
}
}
Q. if we need print a name in 10 times then we have 2 option first is write the printf command in 10 times and second is use loop
In C
# Include
# include
main()
{
int i;
char name[]={"abcd"};
for (i=1;i<=10;i++)
{
printf("%s",name);
}
in C++
# Include
# include
main()
{
int i;
char name[]={"abcd"};
for (i=1;i<=10;i++)
cout<
}
We can also write through Do while and While loop
Do While Loop
Do
{
statement
}
While Loop
main()
{
i=0;
while i<=10
{
statement
i++
}
}