#include
void main( )
{
int a,b,c,d;
cout<<"masukkan nilai segitiga:";
cin>>a;
b=1;
c=a;
for (b=0;b<=a;b++)
{
for (c=a;c>=b;c--)
{
cout<<" ";
}
for (d=1;d<=b;d++)
{
cout<<"* ";
}
cout<
}
}
#include
void main()
{
int w,x,y,z;
cout<<"masukkan tinggi:";
cin>>w;
x=1;
z=y;
for(x=1;x<=w;x++)
{
for(y=1;y>=x;y++)
{
cout<<" ";
}
for (z=w;z>=x;z--)
{
cout<
}
cout<
}
}
Tidak ada komentar:
Posting Komentar