1
0
mirror of https://github.com/krislamo/knrc.git synced 2024-09-19 21:00:35 +00:00

Add the second version formatting

This commit is contained in:
Kris Lamoureux 2021-11-03 02:00:55 -04:00
parent e01d287e88
commit 0d48636cdc
Signed by: kris
GPG Key ID: 3EDA9C3441EDA925

View File

@ -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;
}
}