(C++) PROGRAM KONVERSI SUHU

Cara membuat konversi suhu dengan codeblocks menggunakan bahasa c++,
yang perlu diperhatikan adalah pada saat menggunakan cin sebagai konstantanya,
langsung aja gan,

#include<iostream>
#include<string.h>
#include<conio.h>
using namespace std;
int main()
{
    float Celcius, Fahrenheit;
    cout<<"==============================\n";
    cout<<"Meubah SuhuCelcius Ke Fahrenheit\n";
    cout<<" Fahrenheit\n";

    cout<<"==============================\n";
    cout<<"Masukan Suhu dalam Celcius :";
    cin>>Celcius;
    Fahrenheit= Celcius * 1.8 + 32;
    cout<<"==============================\n";
    cout<<"         HASIL KONVERSI\n";
    cout<<"==============================\n";
    cout<<"Celcius         :"<<Celcius<<" Celcius\n";
    cout<<"Fahrenheit    :"<<Fahrenheit<<" Fahrenheit\n";
    cout<<"==============================\n";
    cout<<endl;
    getch();
}

Related

CPLUS 4159807345381642404

Posting Komentar

emo-but-icon

Follow Us

Hot in week

Recent

Comments

Side Ads

Text Widget

Connect Us

item