Program to display the Output of "*" Using For loop in c++
Program to display the Output of "*" Using For loop in c++
It is a simple program and Dam interesting you can use other symbols and do it you can change the value of the numbers and make it big or small enjoy this program.
Program :-
#include<iostream.h>
void main ()
{
int i,r;
for(i=1;i<=5;i++)
{
for(r=1;r<=i;r++)
{
cout<<"*":
}
cout<<endl;
}
}
}
Output :-
*
**
***
****
*****
It is a simple program and Dam interesting you can use other symbols and do it you can change the value of the numbers and make it big or small enjoy this program.
Program :-
#include<iostream.h>
void main ()
{
int i,r;
for(i=1;i<=5;i++)
{
for(r=1;r<=i;r++)
{
cout<<"*":
}
cout<<endl;
}
}
}
Output :-
*
**
***
****
*****
Comments
Post a Comment