#include<iostream>#include<conio.h>
int main(){int t,y,x;cout << "Masukkan tinggi segitiga : ";cin >> t;cout << "----------------------------\n";
for(y=1;y<=t;y++){for(x=1;x<=y;x++){cout << "*";}cout << "" << endl;}getch();}
Belajar Blogging, Pemrograman C++, Turbo Pascal
#include<iostream>#include<conio.h>
int main(){int t,y,x;cout << "Masukkan tinggi segitiga : ";cin >> t;cout << "----------------------------\n";
for(y=1;y<=t;y++){for(x=1;x<=y;x++){cout << "*";}cout << "" << endl;}getch();}
0 comments:
Post a Comment