int main() { int cels, conver; while(cels != 0){ printf("Digite Celsius: "); scanf("%d", &cels); conver = fahrenheit(cels); printf("Fahrenheit = %d\n", conver); } }
void printFilas(int opcion){ if (opcion == 1){ printf("Fahrenheit a Centigrados\n" ); for (int fahr = 0; fahr <= 300; fahr = fahr + 20 ) printFila(fahr, celsius(fahr)); } else{ printf("2.--Centigrados a Fahrenheit\n" ); for (int celsius = 0; celsius <= 300; celsius = celsius + 20 ) printFila(celsius, fahrenheit(celsius)); } }
int main(void) { printf("¢XC\t¢XF\n"); for (int i = 0; i <= 100; i++) { printf("%d\t%.1f\n", i, fahrenheit(i)); } puts(""); printf("¢XF\t¢XC\n"); for (int i = 32; i <= 212; i++) { printf("%d\t%.1f\n", i, celsius(i)); } puts(""); }
main () { float celsius = LOWER; printf("%s","A table for changing temperstures from Stupid Celsius ones to Real farenheit.\n" "=============================================================================\n" "Celsius\t\tFarenheit\n" "---------\t-------\n"); while (celsius <= UPPER) { printf("%3.0f\t\t%10.5f\n", celsius,fahrenheit(celsius)); celsius = celsius + STEP; } return SUCCESS; }
int main (void) { double DEPTH, /*depth in kilometers*/ C_TEMPERATURE, F_TEMPERATURE; printf("Enter depth in kilometers=> "); scanf("%lf", &DEPTH); C_TEMPERATURE = celsius_at_depth(DEPTH); F_TEMPERATURE = fahrenheit(C_TEMPERATURE); printf("The temperature is %.1f degrees C or %.1f degrees F.\n", C_TEMPERATURE, F_TEMPERATURE); return (0); }