Skip to content

Instantly share code, notes, and snippets.

@nazrdogan
Created August 17, 2013 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nazrdogan/6256301 to your computer and use it in GitHub Desktop.
Save nazrdogan/6256301 to your computer and use it in GitHub Desktop.
Fahrenheit-Celsius table
#include <stdio.h>
#include <stdlib.h>
int 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;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment