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
Can you apply link and association interchangeably?
The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 …). Records the times. c). Do an analysis of the differences in times and submit it in class.
What are the advantages of union?
Can stdout be forced to print somewhere other than the screen?
Is r written in c?
How can I determine whether a machines byte order is big-endian or little-endian?
What is wrong with this declaration?
When c language was developed?
What is a dynamic array in c?
write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.
What is a wrapper function in c?
What is the process to create increment and decrement stamen in c?
How can I find out if there are characters available for reading?
How can I implement sets or arrays of bits?
List some of the dynamic data structures in C?