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 ?    24 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

Describe the order of precedence with regards to operators in C.

0 Answers  


What are the advantages of c preprocessor?

0 Answers  


4) Write a program that takes a 5 digit number and calculates 2 power that number and prints it.

5 Answers  


9.how do you write a function that takes a variable number of arguments? What is the prototype of printf () function? 10.How do you access command-line arguments? 11.what does ‘#include<stdio.h>’ mean? 12.what is the difference between #include<> and #include”…”? 13.what are # pragma staments? 14.what is the most appropriate way to write a multi-statement macro?

1 Answers  


What does the function toupper() do?

0 Answers  






main() { printf(5+"good morning"); printf("%c","abcdefgh"[4]); }the o/p is morning and e...how someone explain

1 Answers  


What is a node in c?

0 Answers  


Given a valid 24 hour format time find the combination of the value and write a program ,do not hard the value and if any other inputs provided should work with the logic implemented Input: 11:30 Output: 13:10 Input: 18:25 Output: 21:58

0 Answers   Zoho,


Write a program to exchange two variaables without temp

9 Answers   Geometric Software,


int a=0,b=2; if (a=0) b=0; else b=*10; What is the value of b ?

6 Answers   TCS,


What are pointers? What are stacks and queues?

0 Answers   Hexaware,


Why is #define used?

0 Answers  


Categories