PROGRAM TO CONVERT TEMPERATURE IN FAHRENHEIR TO TEMPERATURE

C, C++, etc Programing examples. Post as many you can. Test the programs and discuss about the output of the programes.
Forum rules
Please Discuss & post only about the programes and its Output

PROGRAM TO CONVERT TEMPERATURE IN FAHRENHEIR TO TEMPERATURE

Postby praveen » Sun Feb 22, 2009 7:28 pm

/* PROGRAM TO CONVERT TEMPERATURE IN FAHRENHEIR TO TEMPERATURE IN CELSIUS */
Code: Select all
#include<stdio.h>
#include<conio.h>
main()
{
float cels,fahr;
printf("Enter temperature in fahrenheit");
scanf("%f",&fahr);
cels=  (float) (5/9.0)*(fahr-32);
printf("\ntemperature in celsius=%f",cels);
getch();
}
Regards,
Praveen
AMIE Study

ImageImage
-------------------------------------------------------------------------------------------
Work from Home | AMIE Online Coaching
User avatar
praveen
Site Admin
 
Posts: 989
Joined: Thu Oct 23, 2008 1:42 pm
Location: Mumbai
membership: Senior Technician of The Institution of Engineers (India)- ST

ad
 

Return to Computer Notes : Some Sample Programs

Who is online

Users browsing this forum: No registered users and 0 guests