1
0
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:
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 */ 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;
} }
} }