Share this topic on Del.icio.usShare this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on SlashdotShare this topic on StumbleUponShare this topic on TechnoratiShare this topic on TwitterShare this topic on YahooShare this topic on Google buzz

Author Topic: Program Konversi Suhu  (Read 2527 times)

0 Members and 1 Guest are viewing this topic.

Offline cod3-x

  • Newbie
  • *
  • Posts: 15
  • Reputasi: 0

  • Aktivitas bulan ini
    0%
    • Soft4ever
  • Lokasi: West Borneo
  • Jenis Kelamin: Laki-laki
Program Konversi Suhu
« on: 12 April 2010, 14:33:32 »
Ini adalah program c++ untuk mengkonversi suhu menggunakan menu pilihan
silakan lihat kodenya :: :D
Code: [Select]
    #include <iostream.h>
    #include <conio.h>

    int main()
    {
    float C,R,K,F;
    char pilih, ulang;

    start:
    clrscr();
    cout<<" Selamat Datang di program konversi suhu"<<endl;
    cout<<" Konversi celcius ke Reamur, Fahrenheit, dan Kelvin"<<endl;
    cout<<" by Ridwan @ http://4-eversoft.blogspot.com (visit it ^^ )"<<endl;
    cout<<"\\----------------------------------------------------------/"<<endl<<endl;

    cout<<"Masukkan besar suhu (celcius) yang ingin di Konversi : "<<endl;
    cout<<"-->";
    cin>>C;
    cout<<"Anda ingin mengkonversi "<<C<<" Celcius ke dalam apa ?"<<endl;
    cout<<"1. Reamur "<<endl;
    cout<<"2. Fahrenheit "<<endl;
    cout<<"3. KElvin "<<endl;
    cout<<"4. Reamur, Fahrenheit, dan Kelvin "<<endl;
    cout<<"-->";
    cin>>pilih;
    if (pilih=='1'){
    R=0.8*C;
    cout<<"jadi "<<C<<" Celcius = "<<R<<" Reamur"<<endl;
    }
    else if (pilih=='2'){
    F=(C*(9/5))+32;
    cout<<"jadi "<<C<<" Celcius = "<<F<<" Fahrenheit"<<endl;
    }
    else if (pilih=='3'){
    K=C+273;
    cout<<"jadi "<<C<<" Celcius = "<<K<<" Kelvin"<<endl;
    }
    else if (pilih=='4'){
    R=0.8*C; F=(C*(9/5))+32 ;K=C+273;
    cout<<"jadi "<<C<<" Celcius = "<<R<<" Reamur, "<<F<<" Fahrenheit, "<<K<<" Kelvin"<<endl;
    }
    else {
    cout<<"Pilihan hanya ada 4"<<endl;
    }
    ask:
    cout<<"Ulang kembali ? (y/n)"<<endl;
    cin>>ulang;
    if(ulang=='y'||ulang=='Y')
    goto start;
    else if (ulang=='n'||ulang=='Y')
    return 0;
    else {
    goto ask;
    }

    }
Silakan kembangkan programnya..
nb:Aq menggunakan Turbo C++ 4.5 for windows..
souce :
Code: [Select]
http://4-eversoft.blogspot.com/2010/03/c-konversi-suhu.html
« Last Edit: 12 April 2010, 14:59:16 by cod3-x »
Aq adalah seorang anag ingusan di dunia IT
Source Code C++

Forum Informatika

Program Konversi Suhu
« on: 12 April 2010, 14:33:32 »
Sponsored Links:


Offline 1nf0rm4t1c5

  • Administrator
  • *
  • Posts: 1090
  • Reputasi: 15
  • Informatics Developer

  • Aktivitas bulan ini
    4%
    • Forum Informatika
  • Lokasi: Indonesia
  • Jenis Kelamin: Laki-laki
Re: Program Konversi Suhu
« Reply #1 on: 12 April 2010, 15:04:18 »
Thanx. Nice tuts.
Full access for guest [REGISTER]
Please read the rule [RULES]
Promosi?  [STEP-BY-STEP]

RAR PASSWORD : http://if.web.id --> buat buka file rar