mirror of
https://github.com/krislamo/knrc.git
synced 2025-01-08 04:20:34 +00:00
Add the second version formatting
This commit is contained in:
parent
e01d287e88
commit
0d48636cdc
@ -13,8 +13,8 @@ int main()
|
|||||||
|
|
||||||
fahr = lower;
|
fahr = lower;
|
||||||
while (fahr <= upper) {
|
while (fahr <= upper) {
|
||||||
celsius = 5 * (fahr-32) / 9;
|
celsius = (5.0/9.0) * (fahr-32.0);
|
||||||
printf("%g\t%g\n", fahr, celsius);
|
printf("%3.0f %6.2f\n", fahr, celsius);
|
||||||
fahr = fahr + step;
|
fahr = fahr + step;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user