Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


write a c program to convert fahrenheit to celsius?

Answers were Sorted based on User's Feedback



write a c program to convert fahrenheit to celsius?..

Answer / azad sable,chiplun.

void main()
{
float fr,cent;
clrscr();
printf("enter the tempreture in F");
scanf("%f",&fr);
cent=5.0/9.0*(fr-32);
printf("\nTempreture in centigrade=%f",cent);
}
getch();
}

Is This Answer Correct ?    23 Yes 3 No

write a c program to convert fahrenheit to celsius?..

Answer / 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

write a c program to convert fahrenheit to celsius?..

Answer / bukke ramesh naik

/* c=(f-32)/1.8 */#include<stdio.h>
#include<iomap.h>
#define fahern_low 0
#define fahern_max 250
void main()
float c,f;
clrscr();
f=fahern_low;
printf("fahernheat into celsius\n");

while(f<=fahern_max)
{
c=(f-32.0)/1.8;
f=f+c;

}
getch();
}

Is This Answer Correct ?    19 Yes 7 No

write a c program to convert fahrenheit to celsius?..

Answer / ramanan

#include<stdio.h>
#include<conio.h>
void main()
{
float c,t;
clrscr();
printf("\n enter the celsius value...");
scanf("%f",&c)
f=(1.8*c)+32
printf("\n to converted fahernheit is ....%2.f",f);
getch();
}

Is This Answer Correct ?    6 Yes 2 No

Post New Answer



More C Interview Questions

main() { int i,j,A; for(A=-1;A<=1;A++) prinf("%d\t",!!A); }

6 Answers  


An application package has been provided to you without any documents for the following application. The application needs to be tested. How will you proceed?

0 Answers   Aspire, Infogain,


How can I generate floating-point random numbers?

0 Answers  


Do you know what are bitwise shift operators in c programming?

0 Answers  


write a program to display the numbers in the following 4 4 3 3 2 2 1 1 0 1 1 2 2 3 3 4 4

1 Answers  






When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?

0 Answers  


what is constant pointer?

3 Answers  


How would you find a cycle in a linked list?

3 Answers   NSN,


what will be the output for the following main() { printf("hi" "hello"); }

5 Answers   RoboSoft,


how do you execute a c program in unix.

0 Answers  


What's a good way to check for "close enough" floating-point equality?

0 Answers   Celstream,


Why do we use header files in c?

0 Answers  






Categories