Sunday, 14 July 2013

Farenheit to Celsius conversion

#include<iostream.h>
#include<conio.h>
void main()
{
    clrscr();
    float f,c;

    cout<<"\n------------------------------------\n";
    cout<<"  Farenheit to Celsius Conversion \n";
    cout<<"------------------------------------\n\n";

    cout<<"Enter the value of temp in Farenheit : ";
    cin>>f;
    c = (f-32)/1.8;
    cout<<"\n\n Temp in Celsius = "<<c;
    getch();
}

No comments:

Post a Comment