repl.it
@ArjunArunkumar/

farhenheit to celcius table

C

No description

fork
loading
Files
  • main.c
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <stdio.h>

int main(void) {
	float fahr, celsius;
	int lower, upper, step;

	lower = 0;
	upper = 500;
	step = 1;

	celsius = lower;
	printf("Farenheit to celcius conversion table\n by Arjun Arunkumar\n");
	while (celsius <= upper){
		fahr = (9.0/5.0)*celsius + 32.0;
		printf("%f, %f\n", celsius, fahr );
		celsius = celsius + step;
	}
}