Monday, April 16, 2012
Panah (oleh : Patricia Dianita Wijaya)
#include <iostream.h>
#include <conio.h>
int main ()
{
int a,i,j,k,x,b;
cout<<" PROGRAM PANAH OLEH : PATRICIA DIANITA WIJAYA \n ";
cout<<" patriciadianitawijaya.blogspot.com \n ";
cout<<"----------------------------------------";
cout<<" \n\nInput angka = ";
cin>>a;
for(i=1;i<=a;i++)
{
for(j=a;j>i;j--)
{
cout<<" ";
}
for (k=1;k<=i;k++)
{
cout<<" *";
}
cout<<endl;
}
cout<<" ";
for (x=1;x<=a;x++)
{
for (b=2; b<=a; b++) //patriciadianitawijaya.blogspot.com//
{
cout<<" *";
}
cout<<endl;
cout<<" ";
}
//PATRICIA DIANITA WIJAYA//
}
Labels:
Algoritma dan Pemrograman
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment