Di Posting Oleh : Simple Learning
Kategori : C++ EXAMPLES SHAPES c++ shapes code
C++ SHAPES:
*****
C++ SHAPES:
CODE SHAPES USING NESTED FOR �*�.
CODE SHAPES USING NESTED FOR �*�.
*
**
***
****
*****
CODE
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
for(int i=1; i<=5; i++)
{
for(int j=1; j<=i; j++)
{
cout<<"*";
}
cout<<endl<<endl;
}
getch();
}
C++ SHAPES:
CODE SHAPE USING NESTED FOR �*�.
*****
****
***
**
*
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
for(int i=5; i>=1; i--)
{
for(int j=1; j<=i; j++)
{
cout<<"*" ;
}
cout<<endl<<endl;
}
getch();
}
C++ SHAPES:
CODE SHAPES USING NESTED FOR �*�.
*
**
***
****
*****
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
for(int i=1; i<=5; i++)
{
for(int k=5; k>i; k--)
{
cout<<" ";
}
for(int j=1; j<=i; j++)
{
cout<<"*";
}
cout<<endl<<endl;
}
getch();
}
CODE SHAPES USING NESTED FOR �*�.
*****
****
***
**
*
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
for(int i=5; i>=1; i--)
{
for(int k=5; k>i; k--)
{
cout<<" ";
}
for(int j=1; j<=i; j++)
{
cout<<"*";
}
cout<<endl;
}
getch();
}
CODE SHAPES USING NESTED FOR �*�.
1*****
12****
123***
1234**
12345*
123456
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
for(int i=1; i<=6; i++)
{
for(int k=1,a=1; k<=i; k++)
{
cout<<a; a++;
}
for(int j=5; j>=i; j--)
{
cout<<"*";
}
cout<<endl<<endl;
}
getch();
}
0 Response to "C++ SHAPES CODES"
Post a Comment