home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Microsoft Programmer's Library 1.3
/
Microsoft-Programers-Library-v1.3.iso
/
sampcode
/
qc_prog
/
chap03
/
convert.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
UTF-8
Wrap
C/C++ Source or Header
|
1988-04-06
|
337 b
|
14 lines
/* convert.c -- converts Farenheit temprature */
/* to Centigrade; gets value from user */
main()
{
float ftemp, ctemp;
printf("What is the temprature in Farenheit? ");
scanf("%f", &ftemp);
ctemp = (ftemp - 32.0) * 5 / 9.0;
printf("The temprature in Centigrade is %5.2f", ctemp);
}