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();
}
Nice job bro!! keep it up!! it helped me a lot!
ReplyDeleteHow to do the parallelogram shape?
ReplyDelete*
ReplyDelete**
***
****
***
**
*
i want code for this above pattern
#include
Delete#include
using namespace std;
int main()
{
for(int a=1;a<=10;a++)
{
if(a<=5)
{
for(int a1=1;a1<=a;a1++)
{
cout<<"*";
}
}
else{
for(int b=10;b>a;b--)
{
cout<<"*";
}
}
cout<<endl;
}
}
Thanks For Visiting
how to make this pattern?
ReplyDelete1
* 1
3 * 1
* 3 * 1
5 * 3 * 1
5 * 3 * 1
* 3 * 1
3 * 1
* 1
1
how to make asterisk pattern of heptagon. thanks in advance. really needed
ReplyDeleteit
I want a pattern of A hollow triangle please every urgent.....
ReplyDeleteIts Here..
Deletehttp://fahad-cprogramming.blogspot.com/2014/02/hollow-triangle-shape-in-c-programing.html
i want a pattern that make number 1 using *
ReplyDelete