#include <iostream.h>
#include <conio.h>
void main()
{
int tinggi; //untuk tinggi segitiga
clrscr();
cout<<"Masukkan Tinggi Segitiga = "; cin>>tinggi;
cout<<endl;
for(int baris=1; baris<= tinggi; baris++)
{
for(int kolom=1; kolom<=baris; kolom++)
{
cout<<" * ";
cout<<endl;
}
}
getch();
}
you can see, it's so easy . thanks for reading.
No comments:
Post a Comment