12-18-2010, 07:46 PM
(12-01-2010, 09:09 PM)wong_anyar Wrote:(03-13-2010, 03:10 PM)TeRRen.Jr Wrote: om Karose udah beLaJar C/C++ aJa neh..gan tlog jlasin donk....
hehehe..
aNe aJa bAru bisa dikit..
ne aNe share deh..
Perhitungan Luas Segitiga [simpLe]
Code:#include <stdio.h> #include <conio.h> #include <iostream.h> main() { int alas,tinggi,luas; clrscr(); cout << "*--------------------------------------------------*"<<endl; cout << "| @CopyRight By aLdy TeRRen |"<<endl; cout << "| Contact Me : terren@cyberdos.org |"<<endl; cout << "| Visit me : http://terrenjr.co.cc |"<<endl; cout << "*--------------------------------------------------*"<<endl<<endl; cout << "Masukan Alas Segitiga : " ; cin >> alas; cout << "Masukan Tinggi Segitiga : " ; cin >> tinggi; luas=(alas*tinggi)/2; cout << "Luas Segitiga : "<<luas; getch(); }
ntw artinya gmn....???
ane jelasin yang ane tahu aja yh bro...
#include <stdio.h>/<iostream.h> => kl yg ane tahu sih fungsinya sama aja, bedanya stdo pengaruh pada printf, scanf; sedangkan iostream pada cin dan cout;
conio.h => biar proses clrscr ama getch jalan;
cout => untuk menampilkan pada program setelah jalan
cin => untuk menginputkan variabel yg telah didefinisikan di atas...
biar kurangnya di tambah sama yg laen , kl ada yg salah tlng di perbaikin yo


![[Image: crow.jpg]](http://t2.gstatic.com/images?q=tbn:PBHiFuILk76usM:http://i221.photobucket.com/albums/dd308/JuggalotisNinja/crow.jpg)



