#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
cout<<"\n ********* Diamond *********\n"<<endl;
int gotoxy;
int x_1=19;
int y_1=5;
for(int count_1=1;count_1<=5;count_1++)
{
for(int count_2=1;count_2<=count_1;count_2++)
cout<<"* ";
x_1--;
y_1++;
cout<<endl;
}
int x_2=16;
int y_2=10;
for(int count_3=5;count_3>1;count_3--)
{
for(int count_4=count_3;count_4>1;count_4--)
cout<<"* ";
x_2++;
y_2++;
cout<<endl;
}
getch();
return 0;
}
0 comments:
Post a Comment