Saturday, August 22, 2015

Convert Centigrade to Fahrenheit

Q. 104. Program to convert Centigrade into Fahrenheit.

Note: The average body temperature is 98.60F or 370C and formula is:
         F = 9/5 * C + 32




Copy Code:

#include <iostream>
using namespace std;

int main()
{
  float c, f;
  cout << "Enter a value in Centigrade : ";
  cin >> c;
  f = ((9.0/5.0) * c) + 32;
  cout << c <<" Centigrade = " << f << " Fahrenheit";
  return 0;
}


No comments:

Post a Comment