Contoh Program C++ Celsius Ke Fahrenhit:
// Quis.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "iostream.h"
#include "conio.h"
#include "stdlib.h" // coment clear scren
int main(int argc, char* argv[])
{
int z,d,menu;
float r,f;
double c;
do { // loping atau perulangan menu
cout << "pilihan :" <<endl;
cout << "1.celsius ke reamus" <<endl;
cout << "2.celsius ke fahrenheit"<<endl;
cout << "3.Exit";
cout << endl;
cout << "Menu pilihan anda : ";
cin >> menu;
cout << endl;
system("cls"); // comentnya
if (menu==1)
{
cout << "masukan celsius= ";
cin >> c;
while (c<=99)
{
r = c*0.8;
cout<<"hasil konversi suhu dari "<<c<<" derajat celcius ke reamur= "<<r<<endl;
c=c+10;
}
r=100*0.8;
cout<<"hasil konversi suhu dari "<<c<<" drajat celcius ke reamur= "<<r<<endl;
cout<<endl;
}
else
if (menu==2)
{
cout << "masukan celsius = ";
cin >> c;
while(c <= 99)
{
f=c*1.8+32;
cout<<"hasil konversi suhu dari "<<c<<" derajat celcius ke fahrenheit= "<<f<<endl;
c=c+10;
}
f=100*1.8+32;
cout<<"hasil konversi suhu dari "<<c<<" drajat celcius ke Fahrenheit= "<<f<<endl;
cout<<endl;
}
}while(menu != 3); // perulangan menu
return 0;
}
Contoh Program C++ Celcius ke Fahrenheit
Posted by sukariyanta on 4:12 PM
0 comments:
:ilovekaskus :iloveindonesia :kiss :maho
:najis :nosara :marah :berduka
:malu: :ngakak :repost: :repost2:
:sup2: :cendolbig :batabig :recsel
:takut :ngacir2: :shakehand2: :bingung
:cekpm :cd :hammer :peluk
:toast :hoax: :cystg :dp
:selamat :thumbup :2thumbup :angel
:matabelo :mewek: :request :babyboy:
:babyboy1: :babymaho :babyboy2: :babygirl
:sorry :kr: :travel :nohope
:kimpoi :ngacir: :ultah :salahkamar
:rate5 :cool :bola
by Pakto
:mewek2: :rate-5 :supermaho :4L4Y
:hoax2: :nyimak :hotrit :sungkem
:cektkp :hope :Pertamax :thxmomod
:laper :siul :2malu: :ngintip
:hny :cendolnya
by misterdarvus
:maintenis: :maintenis2: :soccer :devil
:kr2: :sunny
Post a Comment