Program Menghitung Luas Bangunan ( C++ )

Posted: November 13, 2011 in C++

#include <iostream.h>

#include <conio.h>

#define phi 3.14

void main()

{

float r, a, t, l, s, b;

cout<<“============================================\n”;

cout<<“= PROGRAM MENGHITUNG LUAS BANGUNAN GIOMETRI=\n”;

cout<<“============================================\n”;

cout<<” \n”;

cout<<“A.LUAS SEGITIGA \n”;

cout<<”   \n”;

cout<<“Luas Segitiga ==> L=a*t/2 \n”;

cout<<“Input Alas (a) = “;cin>>a;

cout<<“Input Tinggi (t) = “;cin>>t;

l =a*t/2;

cout<<“Luas Segitiga Adalah = “<<l<<endl<<endl;

cout<<“B.LUAS LINGKARAN \n”;

cout<<” \n”;

cout<<“Luas Lingkaran–> L=phi*r*r \n”;

cout<<“Input jari-jari (r) = “;cin>>r;

l =phi*r*r;

cout<<“Luas Lingkaran Adalah = “<<l<<endl<<endl;

cout<<“C.LUAS TRAPESIUM \n”;

cout<<” \n”;

cout<<“Luas Trapesium–> L=(a+b)*t/2 \n”;

cout<<“Input Panjang Sisi Atas (a) = “;cin>>a;

cout<<“Input Panjang Sisi Bawah (b) = “;cin>>b;

cout<<“Input Tinggi (t) = “;cin>>t;

l =(a+b)*t/2;

cout<<“Luas Trapesium adalah = “<<l<<endl<<endl;

cout<<“D.LUAS BUJURSANGKAR \n”;

cout<<” \n”;

cout<<“Luas Bujursangkar–> L=s*s \n”;

cout<<“Input Sisi (s) = “;cin>>s;

l =s*s;

cout<<“Luas Bujursangkar Adalah = “<<l<<endl<<endl;

getch();

}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s