Why We Use Conditional loops and Control Statements in C++
For taking more then one value at the time we used loops
loops mean complete one clock in which we give values
They Are Three Types Of loops
(1)For Loop
(2)While Loop
(3) Do While Loop
For Loop
In which We Give the value and for taking many values once time we used for loop
For Example
for(int i=0;i<=10;i++)
Complete Example of For Loop
#include<iostream.h>
#include<conio.h>
main()
{
int a[5];
for(int i=0;i<=9;i++)
{
cout<<"Plz Enter the Numbers";
cout<<"Plz Enter the Numbers";
cin>>a[i];
}
getch();
WHILE LOOP EXAMPLE
#include<iostream.h>
#include<conio.h>
main()
{
int a=0;
while(a<5)
{
cout<<"The number is this"<<a;
a++;
}
getch();
}
while loop c++ multiple conditions
,do while loop c++,
control statements in c++,
while loop c++
DO WHILE LOOP EXAMPLE
#include<iostream.h>
#include<conio.h>
main()
{
int a;
a=0;
do
{
cout<<"HELLO WORD\n";
cout<<"HELLO WORD\n";
}
while(x!=0);
getch();
}
LET,s TRY YOUR OW COMPILER
BEST OF LUCK!!!!!

