#include <iostream.h>
#include <conio.h>
main ()
{
char bentuk;
int a;
cout << " PROGRAM UNTUK MEMBUAT SEGITIGA DENGAN C++ " <<endl;
cout << " ========================================== " <<endl;
cout << " " <<endl;
cout << " " <<endl;
cout << " " <<endl;
cout << "Masukan Banyaknya Inputan Character : ";
cin >> a;
cout << "Masukan Bentuk Character : ";
cin >>bentuk;
cout << endl;
cout << endl;
for (int h=1;h<=a;h++)
{
for (int i=1;i<=h;i++)
{
cout <<bentuk;
}
cout <<endl;
}
for (int j=1;j<=a;j++)
{
for (int k=a;k>j;k--)
{
cout <<bentuk;
}
cout <<endl;
}
cout << endl;
cout << endl;
cout << " ============================================ " <<endl;
cout << " " <<endl;
cout << " " <<endl;
cout << " *** TERIMAKASIH TELAH MENGGUNAKAN PROGRAM INI *** " <<endl;
cout << " ***************** SELAMAT BELAJAR :) ************" <<endl;
getch ();
}
15/03/12
PROGRAM C++ MEMBUAT SEGITIGA BINTANG
Label:
pemrograman
Diposting oleh
from indonesian computer to world
at
3/15/2012 08:40:00 PM
0 komentar
Posting Komentar