mirror of
https://github.com/krislamo/knrc.git
synced 2024-11-10 00:30:35 +00:00
Higher precision conversion table
This commit is contained in:
parent
9a193d84f1
commit
e7e2367bd7
@ -4,7 +4,7 @@
|
|||||||
for fahr = 0, 20, ..., 300 */
|
for fahr = 0, 20, ..., 300 */
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
int fahr, celsius;
|
float fahr, celsius;
|
||||||
int lower, upper, step;
|
int lower, upper, step;
|
||||||
|
|
||||||
lower = 0;
|
lower = 0;
|
||||||
@ -14,7 +14,7 @@ int main()
|
|||||||
fahr = lower;
|
fahr = lower;
|
||||||
while (fahr <= upper) {
|
while (fahr <= upper) {
|
||||||
celsius = 5 * (fahr-32) / 9;
|
celsius = 5 * (fahr-32) / 9;
|
||||||
printf("%d\t%d\n", fahr, celsius);
|
printf("%g\t%g\n", fahr, celsius);
|
||||||
fahr = fahr + step;
|
fahr = fahr + step;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user