write a c program to convert fahrenheit to celsius?
Answer Posted / faizan
/*Logic== C=(f-32)/1.8 ==*/
#include<stdio.h>
#include<conio.h>
#define f_low 0
#define f_max 250
#define step 25
void main()
{
typedef float real;
real fahrenheit,celsius;
clrscr();
fahrenheit=f_low;
printf("Fahrenheit Celsius\n\n");
while(fahrenheit<=f_max)
{
celsius=(fahrenheit-32.0)/1.8;
printf("%5.1f
%7.2f\n\n",fahrenheit,celsius);
fahrenheit=fahrenheit+step;
}
getch();
}
| Is This Answer Correct ? | 26 Yes | 13 No |
Post New Answer View All Answers
How are variables declared in c?
What is the difference between text files and binary files?
I need previous papers of CSC.......plz help out by posting them.......
Explain how can I right-justify a string?
What is else if ladder?
What is echo in c programming?
What is self-referential structure in c programming?
What are the application of c?
Explain the difference between the local variable and global variable in c?
What is a built-in function in C?
What are shell structures used for?
What is the condition that is applied with ?: Operator?
What is a double c?
Lists the benefits of c programming language?
What does it mean when a pointer is used in an if statement?