/* Name: Fahrenheit temperature to Centigrade temperature Author: Dykstra Description: A program to translate the degree of Fahrenheit thermometer to the degree of Centigrade thermometer. Date: 2000-11-4 Copyright: Dykstra */ #include #define SPACE (0x20) // Marco definition void wait(int key); // Function prototype int main(int argc, char *argv[]) { float centigrade, fahrenheit; printf("Please input the Fahrenheit degree :"); scanf("%f", &fahrenheit); centigrade = (fahrenheit - 32) * 5 / 9; printf("Fahrenheit %g equals to Centigrade %g", fahrenheit, centigrade); wait(SPACE); return 0; } void wait(int key) { int ch; while ((ch = getchar()) != key) ; return; }