Sunday, 9 August 2015

Fahrenheit to Celsius Converter

Leave a Comment
Questions:

Fahrenheit to Celsius Converter

Code:

// Fahrenheit to Celsius Converter

#include<iostream>
using namespace std;

//Prototype
float Fahrenheit_to_Celsius(float);
void main()
{
       float fahrenheit=0;
       cout<<"Enter Fahrenheit = ";
       cin>>fahrenheit;
       cout<<"Celsius === "<<Fahrenheit_to_Celsius(fahrenheit)<<endl;
}

//Defination
float Fahrenheit_to_Celsius(float fahrenheit){
return (fahrenheit-32)/1.8;
}




Output

Fahrenheit to Celsius Converter

If You Enjoyed This, Take 5 Seconds To Share It

0 Questions: