#include <iostream>
using namespace std;
/* run this program using the console pauser or add
your own getch, system("pause") or input loop */
int main(int argc, char** argv) {
int i,x,a,b;
cout<<"\t\t\t
=========================\n";
cout<<"\t\t\t ##[ Program for ]##\n";
cout<<"\t\t\t
=========================\n";
cout<<"\n
Masukkan Baris : ";
cin>>x;
i=x-1;
for(a=1;a<=x;a++)
{
for(b=1;b<=i;b++)
cout<<"
";
i--;
for(b=1;b<=2*a-1;b++)
cout<<"*";
cout<<"\n";
}
return
0;
}
Hasil :
No comments:
Post a Comment