Advertisement
idsystems

CPP_Practica26 – Fahrenheit

Jan 30th, 2012
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. // Program: fahrenheit.cc
  2. // Author:  Yoan Pinzon
  3. // Date:    Agosto 30, 2006
  4.  
  5. #include <iostream>
  6.  
  7. using namespace std;
  8.  
  9. int main()
  10. {
  11.    float celsius, fahrenheit;
  12.  
  13.    cout << "Centigrados a Fahrenheit" << endl;
  14.    cout << "========================" << endl;
  15.  
  16.    cout << "Entre una temperatura en grados centigrados= "; cin >> celsius;
  17.  
  18.    fahrenheit = ( 9.0 * celsius ) / 5.0 + 32.0;
  19.  
  20.    cout <<  celsius << " grados centigrados equivalen a "
  21.         <<  fahrenheit << " grados fahrenheit" << endl;
  22.  
  23.    return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement