Friday 26 December 2008

make pyramid with c++

there is the source code to make pyramids. check it out

#include
#include

main()
{
char kar;
int jumlah, dasar, a;
int b=1;
int counter=0;

cout << “—————————————————————-\n”; cout << “ PROGRAM MEMBUAT BENTUK PIRAMIDA \n”; cout << “ OLEH : M. LATIF ROZI \n”; cout << “ SMA NEGERI 3 SEMARANG \n”; cout << “—————————————————————-\n”;

while (cin)
{
cout<<”Masukkan karakter yang akan dibuat piramid : “; cin>>kar;
cout << “Masukkan besar piramid : “; cin >> dasar;
jumlah=(dasar/2)+5-counter;
a=1;
while(jumlah>5)
{
jumlah=(dasar/2)+5-counter;
cout<0)
{
cout<<<<



There is the screenshot

0 comments: