Author: Parveen Malik
Date: 05/01/11 10:37
*/
#include<stdio.h>
#include<conio.h>
void main()
{
int lower,upper,steps;
int farn;
float celcius;
lower=0;
upper=100; //you can chanage these parameters like lower,upper and steps
steps=5;
farn=lower;
printf("Fareneit\tCelcius\n"); // \t is used to give tab
while(farn<=upper)
{
celcius=5.0/9.0*(farn-32.0); // formula to convert Farenheit to Celcius
printf("%d\t\t%.2f\n",farn,celcius);
farn+=steps;
}
getch();
}
2 comments:
i was looking for the same blog.
i have noted it down.
and nice tut with comments and output pic.
Can you post some examples on array and pointers.
Post a Comment