rikardoricz

zad8 Tomasz Świątek 3bTI/2

Oct 27th, 2020
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     float fah;
  8.     float cel;
  9.     float kel;
  10.  
  11.     cout << "Podaj temperature w stopniach Celsjusza: ";
  12.     cin >> cel;
  13.  
  14.     fah = cel * 1.8 + 32;
  15.     kel = cel + 273.15;
  16.  
  17.     cout << "Temperatura w stopniach Fahrenheita: " << fah << endl;
  18.     cout << "Temperatura w stopniach Kelvina: " << kel << endl;
  19.  
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment