Hasil Running |
/*PROGRAM PERSEGI*/
#pragma argsused
#include<conio.h>
#include<iostream.h>
#include<math.h>
int main()
{
int ting, pan, i, j;
cout<<"***MEMBUAT BENTUK PERSEGI**"<<endl;
cout<<"==========================="<<endl;
cout<<"Masukkan jumlah Tinggi : "; cin>>ting;
cout<<"Masukkan jumlah Panjang : "; cin>>pan;
cout<<endl;
for (i=1; i<=ting; i++)
{
cout<<" ";
for (j=1; j<=pan; j++)
cout<<"*"<<" ";
cout<<endl;
}
cout<<endl;
cout<<"Ukuran persegi : "<<pan<<" x "<<ting;
getch();
}
0 komentar:
Posting Komentar