You are on page 1of 2

#include<iostream.

h>
#include<stdlib.h>
#include<iomanip.h>
main()
{ int a,b,c=2,en,ciz,uz,k,y,gen,gboy,z,f;
cout<<"yz izme programi"<<endl;
cout<<"yzn eni kac yildiz olsun"<<endl;
cin>>en;
cout<<"kac tane sac cizgisi olsun"<<endl;
cin>>ciz;
cout<<"sac nekadar uzun osun"<<endl;
cin>>uz;
cout<<"gozun eni ne olsun"<<endl;
cin>>gen;
cout<<"yuz nekadar boyda olsun"<<endl;
cin>>y;
cout<<"goz nekadar boyda olsun"<<endl;
cin>>gboy;
z=y/3;
f=(en-2*gen)/2-2;
k=en/ciz;
//kayik sa kismi
for(b=0;b<uz;b++)
{for(a=0;a<ciz;a++)
cout<<"*"<<setw(k);
if(b==0)
cout<<"*";
cout<<endl;
if(b==uz-1)
break;
cout<<setw(c)<<"*"<<setw(k);
c++;
}

for(b=0;b<en;b++)
{
if(b==0)
{cout<<setw(c)<<"*";
continue;}
cout<<"*";
}
cout<<endl;
for(b=0;b<y;b++)
{
if(b==z)
{cout<<setw(c)<<"*";
for(a=0;a<gen;a++)
{if(a==0)
cout<<setw(f-4)<<"*";
cout<<"*";
}
cout<<setw(2);

for(a=0;a<gen;a++)
{if(a==0)
cout<<setw(en-(2*f+1))<<"*";
cout<<"*";
}
cout<<setw(c)<<"*";
cout<<endl;
}
cout<<setw(c)<<"*"<<setw(en-1)<<"*"<<endl;

}
for(b=0;b<en;b++)
{
if(b==0)
{cout<<setw(c)<<"*";
continue;}
cout<<"*";
}
cout<<endl;

system("PAUSE");
return 0;
}

You might also like