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
Why can’t constant values be used to define an array’s initial size?
What does dm mean sexually?
What are variables and it what way is it different from constants?
In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none
what are bit fields in c?
Explain what is wrong in this statement?
List the difference between a 'copy constructor' and a 'assignment operator' in C?
What do you mean by Recursion Function?
Why are all header files not declared in every c program?
If the size of int data type is two bytes, what is the range of signed int data type?
Can we access array using pointer in c language?
What is the difference between %d and %i?
How do you define a function?
What is the mean of function?
Is malloc memset faster than calloc?