#include<iostream>
using namespace std;
#include<conio.h>
#include<windows.h>
int main ()
{
SetConsoleTextAttribute(GetStdHandle( STD_OUTPUT_HANDLE ), 2);
for(int i=1;i<=10;i++)
{
for(int j=10;j>=i;j--)
cout<<" ";
for(int k=1;k<=2*i-1;k++)
cout<<"*";
cout<<"\n";
}
for(int i=3;i<=10;i++)
{
for(int j=10;j>=i;j--)
cout<<" ";
for(int k=1;k<=2*i-1;k++)
cout<<"*";
cout<<"\n";
}
for(int i=3;i<=10;i++)
{
for(int j=10;j>=i;j--)
cout<<" ";
for(int k=1;k<=2*i-1;k++)
cout<<"*";
cout<<"\n";
}
for(int i=5;i<=10;i++)
{
for(int j=10;j>=i;j--)
cout<<" ";
for(int k=1;k<=2*i-1;k++)
cout<<"*";
cout<<"\n";
}
{
int i;
for(int j=10;j>=i;j--)
cout<<" ";
for(int k=1;k<=2*i-1;k++)
cout<<"*";
cout<<"\n";
}
for(int i=2;i<=4;i++)
{
for(int j=10;j>=i;j--)
cout<<" ";
for(int k=1;k<=2*i-1;k++)
cout<<"*";
cout<<"\n";
}
SetConsoleTextAttribute(GetStdHandle( STD_OUTPUT_HANDLE ), 0);
return 0;
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.