satriafu5710

Konversi Satuan Celcius ke Fahrenheit, Kelvin, dan Reamur C++

May 3rd, 2021
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.55 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. int main(){
  5.  
  6.     float celcius, fahrenheit, kelvin, reamur;
  7.  
  8.     cout << "\t Konversi Satuan Celcius ke Fahrenheit, Kelvin, & Reamur \n\n";
  9.  
  10.     cout << " Masukkan Nilai Satuan Celcius : ";
  11.     cin >> celcius;
  12.  
  13.     fahrenheit = 9 /(float) 5 * celcius + 32;
  14.     cout << "\n Nilai Satuan Fahrenheitnya : " << fahrenheit;
  15.  
  16.     kelvin = celcius + 273;
  17.     cout << "\n Nilai Satuan Kelvinnya     : " << kelvin;
  18.  
  19.     reamur = 4 /(float) 5 * celcius;
  20.     cout << "\n Nilai Satuan Reamurnya     : " << reamur;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment