Devilzc0de Forum Follow @devilzc0de
  • Home
  • Hacking
  • Networking
  • Programming
  • O.S
  • Server
  • Tweets
  • Search
  • Member List
  • Calendar
Current time: 05-23-2013, 10:51 PM Hello There, Guest! (Login — Register)
Devilzc0de Forum › Information Technology › Programming › C / C++ v
« Previous 1 ... 10 11 12 13 14 15 Next »

Menghitung Luas dan keliling gabungan

Home General Computer Multimedia Business Lounge

Post Reply 
Tweet
Threaded Mode | Linear Mode
Menghitung Luas dan keliling gabungan
06-12-2011, 10:31 PM (This post was last modified: 06-12-2011 10:34 PM by jinjun.)
Post: #1
jinjun Offline
./Devilz Officer
Posts: 84
Joined: Apr 2011
Reputation: 1
Menghitung Luas dan keliling gabungan
ini adalah code untuk menghitung luas dan keliling gabungan diantaranya lingkaran, persegi panjang, dan segitiga

Code:
#include <iostream.h>
#include <conio.h>
main()
{
const float pi=3.14;
float r, p, l, a, t, luas, kel;
int pil;
clrscr();
do{
clrscr();
cout << "Program Menghitung Luas dan Keliling Gabungan" <<endl;
cout << "=================================="<<endl;
cout << "=  1. Menghitung luas dan keliling lingkaran"<<endl;
cout << "=  2. Menghitung luas dan keliling segitiga"<<endl;
cout << "=  3. Menghitung luas dan keliling persegi panjang"<<endl;
cout << "=================================="<<endl;
cout << "pilih no 1-3?  = ";
cin >>pil;
clrscr();
if (pil==1)
{
clrscr;
cout << "Masukan jari-jari lingkaran :";
cin >>r;
luas=pi*r*r;
kel=2*pi*r;
cout << "Luas lingkaran adalah : " <<luas <<endl;
cout << "Keliling Lingkaran adalah : " <<kel <<endl;
getch();
}
else if (pil==2)
{
clrscr();
cout << "Masukan alas segitiga : ";
cin >>a;
cout << "masukan tinggi segitiga :";
cin >>t;
luas=0.5*a*t;
kel=a+a+a;
cout << "luas segitiga adalah : " <<luas <<endl;
cout << "Keliling segitiga adalah : " <<kel <<endl;
getch();
}
else if (pil==3)
{
clrscr();
cout << "Masukan panjang : ";
cin >>p;
cout << "Masukan lebar : ";
cin >>l;
luas=p*l;
kel=2*(p+l);
cout << "luas persegi panjang adalah : " <<luas <<endl;
cout << "keliling persegi panjang adalah : " <<kel <<endl;
getch();
}
else
cout << "Maaf, anda salah memasukan input ";
}while(pil<=3);
getch();
return 0;
}

semoga bermanfaat
Find all posts by this user
Quote this message in a reply
06-12-2011, 10:32 PM
Post: #2
Wayc0de Offline
-= Sifu Makan Sonice =-
**
Moderators
Posts: 2,981
Joined: Nov 2010
Reputation: 61
RE: Menghitung Luas dan keliling gabungan
wah keren om SCnya mantap

dh lama nie g utak atik Turbo C hmm

ea mskpn tampilannya cman hitam doank ngakak
Visit this user's website Find all posts by this user
Quote this message in a reply
06-12-2011, 10:35 PM (This post was last modified: 06-12-2011 10:37 PM by jinjun.)
Post: #3
jinjun Offline
./Devilz Officer
Posts: 84
Joined: Apr 2011
Reputation: 1
RE: Menghitung Luas dan keliling gabungan
(06-12-2011 10:32 PM)dZheNwaY Wrote:  wah keren om SCnya mantap

dh lama nie g utak atik Turbo C hmm

ea mskpn tampilannya cman hitam doank ngakak

tuntutan kuliah mas jadi harus banyak belajarbelajarbelajar
Find all posts by this user
Quote this message in a reply
06-12-2011, 10:36 PM
Post: #4
Wayc0de Offline
-= Sifu Makan Sonice =-
**
Moderators
Posts: 2,981
Joined: Nov 2010
Reputation: 61
RE: Menghitung Luas dan keliling gabungan
(06-12-2011 10:35 PM)jinjun Wrote:  tuntunan kuliah mas jadi harus banyak belajarbelajarbelajar

ouw gt ea

* Wayc0de dh lama g pelajarin Turbo C suram

yg semangat ea bro lw kuliah hmm
Visit this user's website Find all posts by this user
Quote this message in a reply
06-12-2011, 10:39 PM
Post: #5
jinjun Offline
./Devilz Officer
Posts: 84
Joined: Apr 2011
Reputation: 1
RE: Menghitung Luas dan keliling gabungan
(06-12-2011 10:36 PM)dZheNwaY Wrote:  
(06-12-2011 10:35 PM)jinjun Wrote:  tuntunan kuliah mas jadi harus banyak belajarbelajarbelajar

ouw gt ea

* d'ZheNwaY dh lama g pelajarin Turbo C suram

yg semangat ea bro lw kuliah hmm
tp asik jg belajar c++ bener" mengasah coding kita
Find all posts by this user
Quote this message in a reply
06-12-2011, 10:40 PM
Post: #6
dea_imutz Offline
./Devilz 1st Cadet
Posts: 1
Joined: Jun 2011
Reputation: 0
RE: Menghitung Luas dan keliling gabungan
thanks kakak wawa saya paling suka sama C++ asik
Find all posts by this user
Quote this message in a reply
06-12-2011, 10:41 PM
Post: #7
Wayc0de Offline
-= Sifu Makan Sonice =-
**
Moderators
Posts: 2,981
Joined: Nov 2010
Reputation: 61
RE: Menghitung Luas dan keliling gabungan
(06-12-2011 10:39 PM)jinjun Wrote:  tp asik jg belajar c++ bener" mengasah coding kita

lw maen coding semuanya mang asyik kq om hmm

g cman C++ j, tp yg lainnya juga menarik tuk di pelajarin lebih lanjut hmm
Visit this user's website Find all posts by this user
Quote this message in a reply
06-12-2011, 11:26 PM
Post: #8
castro Offline
./ Kimcil HunteR \.
Posts: 550
Joined: Feb 2011
Reputation: 27
RE: Menghitung Luas dan keliling gabungan
waw..smangat
ini turbo C ya omz??piss
ane cuma bisa java pasrah
thanks omz sharenya buat belajar pemograman C wawa
Find all posts by this user
Quote this message in a reply
06-12-2011, 11:57 PM
Post: #9
jinjun Offline
./Devilz Officer
Posts: 84
Joined: Apr 2011
Reputation: 1
RE: Menghitung Luas dan keliling gabungan
(06-12-2011 11:26 PM)castro Wrote:  waw..smangat
ini turbo C ya omz??piss
ane cuma bisa java pasrah
thanks omz sharenya buat belajar pemograman C wawa
pake turbo c++ kang
Find all posts by this user
Quote this message in a reply
06-13-2011, 10:33 AM
Post: #10
apiep Away
./Devilz Officer
Posts: 51
Joined: Jun 2011
Reputation: 0
Thumbs Up RE: Menghitung Luas dan keliling gabungan
bagus nich, tapi beda nggak kalo pake kompiler gcc?belajar
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Topic Tools
Topic Link :
BBCode :
HTML Code :
View a Printable Version Send Thread to a Friend Subscribe to this thread
Submit Google Submit Face book Submit to Digg Submit to Reddit Submit to Furl Submit to Del.icio.us Submit to Jeqq

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Menghitung Nilai Maksimal dan Minimal joe_haviz 5 2,057 02-26-2012 11:23 PM
Last Post: jackerp
  Hasil perhitungan luas segitiga di C ngaco ! farhan007 9 1,331 10-23-2011 09:16 PM
Last Post: gadis

Users Browsing
1 Guest(s)

  • Contact Us
  • devilzc0de
  • Return to Top
  • Mobile Version
  • RSS Syndication
  • Help
Current time: 05-23-2013, 10:51 PM Powered By MyBB, © 2002-2013 MyBB Group. Theme created by Justin S. | Mixed By Chaer.Newbie | Fixed By Aditya

USING THIS SITE INDICATES THAT YOU HAVE READ AND ACCEPT OUR TERMS. IF YOU DO NOT ACCEPT THESE TERMS, YOU ARE NOT AUTHORIZED TO USE THIS SITE