Convert Fahrenheit to Celsius in C++


Prev Tutorial Next Tutorial

C++ Program to Convert Fahrenheit to Celsius

Fahrenheit and Celsius are two unit for measure temperature. We have standard formula to Convert Fahrenheit to Celsius, using this formula we can change temperature.

Formula

 c = (f - 32) * 5/9;
 

Convert Fahrenheit to Celsius in C++


#include<iostream.h>
#include<conio.h>

void main()
{
 float cel, far;
  clrscr();
  cout<<"Enter temp. in Fahrenheit: ";
  cin>>far;
  cel = (far - 32) * 5/9;
  cout<<"Temp. in Celsius: "<<cel;
 getch();
}

Output

Enter temp. in Fahrenheit: 98
Temp. in Celsius: 36.666668

Prev Tutorial Next Tutorial

Google Advertisements
Download Projects

Google Adsense Advertisements

Buy 3 Year Old Domain, Tutorialday.com, SeosmoTools.com @$200

Buy This Ad Space @$50 per Month, Ad Size 300X250 Contact on: hitesh.xc@gmail.com WhatsApp no. 8882538826

Yahoo Advertisements