#include <iostream.h>
#include <conio.h>
int main()
{
int n, i, j;
clrscr();
cout<<"Inputkan Jumlah: ";
cin>>n;
for (i=1; i<=n; i++)
{
for (j=n; j>i; j--)
{
cout<<" ";
}
for (int k=1; k<=i; k++)
{
cout<<" *";
}
cout<<"\n";
}
getch();
}
0 komentar:
Posting Komentar