#include <iostream>
using namespace std;
int main () {
int
panjang,lebar,i,a;
cout<<"Masukkan nilai panjang jendela : ";
cin>>panjang;
cout<<"Masukkan nilai lebar jendela : ";
cin>>lebar;
for(i=0;i<panjang;i++){
for(a=0;a<1;a++)
if(i==0 ||
i==panjang/2 || a==0 || a==lebar-1 || a==lebar/2 || i ==panjang-1)
{
cout<<"* ";
}
else
{cout<<" ";}
cout<<endl;
}
return 0;
}
0 komentar:
Posting Komentar