Return to Snippet

Revision: 20630
at November 20, 2009 09:21 by iLLUMIN


Initial Code
#include <stdio.h>
main()
{
	int fahr, celsius;
	int lower,upper,step;

	lower = 0;
	upper = 300;
	step = 20;

	fahr = lower;
	while(fahr<=upper){
		celsius = 5 * (fahr-32) / 9;
		printf("%d\t%d\n", fahr,celsius);
		fahr = fahr + step;
	}
}

Initial URL
www.sa1t.ru

Initial Description
This program show two columns of temperature. In left - t of celsius, in right - t. of fahr.

Initial Title
Celsius -> Fahr

Initial Tags
c

Initial Language
C