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

Higher precision conversion table

This commit is contained in:
Kris Lamoureux 2021-11-03 00:58:39 -04:00
parent 9a193d84f1
commit e7e2367bd7
Signed by: kris
GPG Key ID: 3EDA9C3441EDA925

View File

@ -4,7 +4,7 @@
for fahr = 0, 20, ..., 300 */
int main()
{
int fahr, celsius;
float fahr, celsius;
int lower, upper, step;
lower = 0;
@ -14,7 +14,7 @@ int main()
fahr = lower;
while (fahr <= upper) {
celsius = 5 * (fahr-32) / 9;
printf("%d\t%d\n", fahr, celsius);
printf("%g\t%g\n", fahr, celsius);
fahr = fahr + step;
}
}