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