Monday, April 16, 2012

SEGITIGA TERBALIK


#include<iostream.h>
#include<conio.h>
main()
{
int a,b,c,v;


cout<<"Masukkan Angka Untuk Gambar Segitiga :";
cin>>v;
cout<<endl;


for(a=0;a<=v;a++)
{
for(b=0;b<=a;b++)
{
cout<<" ";
}
for(c=0;c>=(a-v);c--)
{
cout<<"*";
}
for(c=0;c<(v-a);c++)
{
cout<<"*";
}
cout<<endl;
}
getch();
}

No comments:

Post a Comment