Find Here !!!

Wednesday, 19 March 2014

Program C++ menggunakan FOR membentuk STT - PLN

STT - PLN

__________________________________________________________
#include<iostream.h>

main()
{

int a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,x=6,y=8,z=8,v=8,w=8,xx=3,yy=6,ww=6,vv=3;

cout<<endl<<endl;


for(a=1;a<=2;a++)//1//
{
for(b=2;b>=a;b--)
{
cout<<" ";
}
for(c=1;c<=x;c++)
{
cout<<"*";
}
x=x+2;
for(d=2;d>=a;d--)
{
cout<<" ";
}
for(e=2;e<=3;e++)
{
cout<<" ";
}
for(f=2;f>=a;f--)
{
cout<<" ";
}
for(g=1;g<=z;g++)
{
cout<<"*";
}
z=z+2;
for(h=2;h>=a;h--)
{
cout<<" ";
}
for(i=2;i<=3;i++)
{
cout<<" ";
}
for(j=2;j>=a;j--)
{
cout<<" ";
}
for(k=1;k<=v;k++)
{
cout<<"*";
}
v=v+2;
for(l=2;l>=a;l--)
{
cout<<" ";
}
for(m=2;m<=6;m++)
{
cout<<" ";
}
for(n=2;n>=a;n--)
{
cout<<" ";
}
for(o=1;o<=w;o++)
{
cout<<"*";
}
w=w+2;
for(p=2;p>=a;p--)
{
cout<<" ";
}
for(r=2;r<=3;r++)
{
cout<<" ";
}
for(s=1;s<=2;s++)
{
cout<<"*";
}
for(q=1;q<=8;q++)
{
cout<<" ";
}
for(s=1;s<=2;s++)
{
cout<<"*";
}
for(t=2;t<=a;t++)
{
cout<<" ";
}
for(s=1;s<=2;s++)
{
cout<<"*";
}
for(u=1;u<=ww;u++)
{
cout<<" ";
}
ww=ww-1;
for(s=1;s<=2;s++)
{
cout<<"*";
}
cout<<endl;
}

for(a=1;a<=1;a++)//2//
{
cout<<" ";
for(b=1;b<=2;b++)
{
cout<<"*";
}
for(d=1;d<=14;d++)
{
cout<<" ";
}
for(e=1;e<=2;e++)
{
cout<<"*";
}
for(h=1;h<=12;h++)
{
cout<<" ";
}
for(i=1;i<=2;i++)
{
cout<<"*";
}
for(l=1;l<=11;l++)
{
cout<<" ";
}
for(n=1;n<=2;n++)
{
cout<<"*";
}
for(k=1;k<=6;k++)
{
cout<<" ";
}
for(n=1;n<=2;n++)
{
cout<<"*";
}
for(r=1;r<=3;r++)
{
cout<<" ";
}
for(s=1;s<=2;s++)
{
cout<<"*";
}
for(q=1;q<=8;q++)
{
cout<<" ";
}
for(s=1;s<=2;s++)
{
cout<<"*";
}
for(t=1;t<=2;t++)
{
cout<<" ";
}
for(s=1;s<=2;s++)
{
cout<<"*";
}
for(u=4;u>=1;u--)
{
cout<<" ";
}
for(s=1;s<=2;s++)
{
cout<<"*";
}

cout<<endl;
}

for(a=1;a<=2;a++)//3//
{
for(b=1;b<=a;b++)
{
cout<<" ";
}
for(c=1;c<=7;c++)
{
cout<<"*";
}
for(d=2;d>=a;d--)
{
cout<<" ";
}
for(e=1;e<=7;e++)
{
cout<<" ";
}
for(f=1;f<=2;f++)
{
cout<<"*";
}
for(h=1;h<=12;h++)
{
cout<<" ";
}
for(i=1;i<=2;i++)
{
cout<<"*";
}
for(l=1;l<=4;l++)
{
cout<<" ";
}
for(n=1;n<=4;n++)
{
cout<<"*";
}
for(k=1;k<=3;k++)
{
cout<<" ";
}
for(o=1;o<=2;o++)
{
cout<<"*";
}
for(j=8;j>=a;j--)
{
cout<<"*";
}
for(p=1;p<=a;p++)
{
cout<<" ";
}
for(r=1;r<=2;r++)
{
cout<<" ";
}
for(s=1;s<=2;s++)
{
cout<<"*";
}
for(q=1;q<=8;q++)
{
cout<<" ";
}
for(s=1;s<=2;s++)
{
cout<<"*";
}
for(t=1;t<=xx;t++)
{
cout<<" ";
}
xx=xx+1;
for(s=1;s<=2;s++)
{
cout<<"*";
}
for(u=1;u<=vv;u++)
{
cout<<" ";
}
vv=vv-1;
for(s=1;s<=2;s++)
{
cout<<"*";
}
cout<<endl;
}

for(a=1;a<=1;a++)//4//
{
for(b=1;b<=7;b++)
{
cout<<" ";
}
for(c=1;c<=2;c++)
{
cout<<"*";
}
for(e=1;e<=8;e++)
{
cout<<" ";
}
for(f=1;f<=2;f++)
{
cout<<"*";
}
for(h=1;h<=12;h++)
{
cout<<" ";
}
for(i=1;i<=2;i++)
{
cout<<"*";
}
for(l=1;l<=11;l++)
{
cout<<" ";
}
for(n=1;n<=2;n++)
{
cout<<"*";
}
for(r=1;r<=11;r++)
{
cout<<" ";
}
for(s=1;s<=2;s++)
{
cout<<"*";
}
for(q=1;q<=8;q++)
{
cout<<" ";
}
for(s=1;s<=2;s++)
{
cout<<"*";
}
for(t=1;t<=5;t++)
{
cout<<" ";
}
for(s=1;s<=2;s++)
{
cout<<"*";
}
for(u=1;u<=1;u++)
{
cout<<" ";
}
for(s=1;s<=2;s++)
{
cout<<"*";
}
cout<<endl;
}

for(a=1;a<=2;a++)//5//
{
for(b=1;b<=a;b++)
{
cout<<" ";
}
for(c=1;c<=y;c++)
{
cout<<"*";
}
y=y-2;
for(d=1;d<=a;d++)
{
cout<<" ";
}
for(e=1;e<=7;e++)
{
cout<<" ";
}
for(f=1;f<=2;f++)
{
cout<<"*";
}
for(h=1;h<=12;h++)
{
cout<<" ";
}
for(i=1;i<=2;i++)
{
cout<<"*";
}
for(l=1;l<=11;l++)
{
cout<<" ";
}
for(n=1;n<=2;n++)
{
cout<<"*";
}
for(r=1;r<=11;r++)
{
cout<<" ";
}
for(s=1;s<=2;s++)
{
cout<<"*";
}
for(m=6;m>=a;m--)
{
cout<<"*";
}
for(o=1;o<=a;o++)
{
cout<<" ";
}
for(q=1;q<=1;q++)
{
cout<<" ";
}
for(s=1;s<=2;s++)
{
cout<<"*";
}
for(t=1;t<=yy;t++)
{
cout<<" ";
}
yy=yy+1;
for(s=1;s<=2;s++)
{
cout<<"*";
}
for(p=2;p>=a;p--)
{
cout<<"*";
}
cout<<endl;

}
______________________________________________________
 We Are :)

No comments:

Post a Comment