#include<iostream.h>
#include<conio.h>
main()
{
int i,j,k,n;
cout<<"Masukkan Angka maksimum :";
cin>>n;
cout<<endl;
for (i=n;i>=0;i--)
{
for(j=i;j>=0;j--)
{
cout<<" ";
}
for(k=0;k<=n-i;k++)
{
cout<<"*";
}
for(k=0;k<n-i;k++)
{
cout<<"*";
}
cout<<endl;
}
getch();
}
Tidak ada komentar:
Posting Komentar