Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
K&R/1_5
#include <stdio.h> /* print Fahrenheit-Celsius table for fahr = 0, 20, ..., 300; floating-point version */ main() { float fahr, celsius; float lower, upper, step; lower = 0; /* lower limit of temperatuire scale */ upper = 300; /* upper limit */ step = 20; /* step size */ celsius = upper; printf("Celcius\t\tFahrenheit\n"); /*header*/ while (celsius >= lower) { /*celsius = (5.0/9.0) * (fahr-32.0);*/ fahr = (celsius / (5.0/9.0)) + 32.0; printf("%7.0f\t\t%10.0f\n", celsius, fahr); celsius = celsius - step; } }
run
|
edit
|
history
|
help
0
Conflito entre 4 threads
A_141124Burbuja
pattern 12
Pregunta de función cantidad de digitos
Jan23
Iterated sums
18BCE2182 ASSESS_1 Q2-1
Pointer arithmatic
Is const really const?
Project 3 Part 1 v1.3