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


Please Help Members By Posting Answers For Below Questions

Can you apply link and association interchangeably?

649


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.

1612


What are the advantages of union?

599


Can stdout be forced to print somewhere other than the screen?

589


Is r written in c?

699






How can I determine whether a machines byte order is big-endian or little-endian?

590


What is wrong with this declaration?

585


When c language was developed?

609


What is a dynamic array in c?

567


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.

2243


What is a wrapper function in c?

555


What is the process to create increment and decrement stamen in c?

560


How can I find out if there are characters available for reading?

609


How can I implement sets or arrays of bits?

575


List some of the dynamic data structures in C?

764