#include <iostream>
#include <conio>
#include <stdio>
main()
{
int x,z=0,n,s,s1;
cout<<"Masukkan jumlah baris yang ingin ditampilkan : "; cin>>n;
cout<<endl;
s1=n;
for(x=1;x<=n;x++)
{
for(s=1;s<=s1;s=s+1)
{
cout<<" ";
} s1=s1-1;
int y;
for(y=1;y<=x;y++)
{
cout<<'*';
z=z+1;
}
cout<<endl;
}
cout<<"\nBanyak Bintang = "<<z;
getch();
}
5.25.2014
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar