Kapal Tradisional
_________________________________________________________
#include <iostream.h>
main ()
{
int a,b,c,k,l,m,n,z,x=30;
cout<<" KAPAL TRADISIONAL\n\n";
for(z=1;z<=1;z++)
{
for(k=1;k<=10;k++)
{
cout<<" ";
}
for(m=1;m<=36;m++)
{
cout<<"=";
}
cout<<endl;
}
for(a=1;a<=5;a++)
{
for(k=1;k<=10;k++)
{
cout<<" ";
}
cout<<"||";
for(b=1;b<=10;b++)
{
cout<<" ";
}
cout<<"=";
for(c=1;c<=a;c++)
{
if(c==a)
{cout<<"|_";}
else
{cout<<"| ";}
}
for(l=5;l>=a;l--)
{
cout<<" ";
}
for(m=1;m<=9;m++)
{
cout<<" ";
}
cout<<"||";
cout<<endl;
}
for(a=1;a<=5;a++)
{
for(k=1;k<=10;k++)
{
cout<<" ";
}
cout<<"||";
for(b=1;b<=10;b++)
{
cout<<" ";
}
cout<<"=";
for(c=4;c>=a;c--)
{
if(c==a)
{cout<<"|_";}
else
{cout<<"| ";}
}
for(l=1;l<=a;l++)
{
cout<<" ";
}
for(m=1;m<=11;m++)
{
cout<<" ";
}
cout<<"||";
cout<<endl;
}
for(a=1;a<=3;a++)
{
for(k=1;k<=10;k++)
{
cout<<" ";
}
cout<<"||";
for(b=1;b<=10;b++)
{
cout<<" ";
}
cout<<"=";
for(m=1;m<=21;m++)
{
cout<<" ";
}
cout<<"||";
cout<<endl;
}
for(a=1;a<=4;a++)
{
for(k=1;k<=10;k++)
{
cout<<" ";
}
cout<<"||";
for(b=1;b<=a;b++)
{
cout<<" ";
}
for(c=1;c<=x;c++)
{
cout<<"*";
}
x=x-2;
for(n=1;n<=a;n++)
{
cout<<" ";
}
cout<<"||";
cout<<endl;
}
for(z=1;z<=1;z++)
{
for(k=1;k<=10;k++)
{
cout<<" ";
}
for(m=1;m<=36;m++)
{
cout<<"=";
}
cout<<endl;
}
}
____________________________________________________
Semoga Bermanfaat :)
No comments:
Post a Comment