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

Advertisements
z
Download Projects

Advertisements

Download WhatsApp Status Video

Buy This Ad Space Only $50 per Month, Ad Size 300X250 Contact on: [email protected] WhatsApp no. 8882538826

Google Adsense Advertisements