#include <cstdlib>
#include <iostream>
#include <iomanip.h>
using namespace std;
int main(int argc, char *argv[])
{
char c='*';
int size;
cout<<"enter size\n";
cin>>size;
int a=10;
int k=0;
int i=0;
while(k<3){
for(;i<size;i=i+2)
{
cout<<setw(a);
for(int j=0;j<=i;j++)
cout<<c;
cout<<endl;
a--;
}
a=10;
k++;
a=a-k;
i=k;
}
system("PAUSE");
return EXIT_SUCCESS;
}
No comments:
Post a Comment