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

Can the curly brackets { } be used to enclose a single line of code?

0 Answers  


How can you find the exact size of a data type in c?

0 Answers  


char ch=10;printf("%d",ch);what is the output

14 Answers   Accenture,


What is the maximum no. of arguments that can be given in a command line in C.?

0 Answers   HCL,


Explain is it valid to address one element beyond the end of an array?

0 Answers  


i want to know the procedure of qualcomm for getting a job through offcampus

0 Answers   HCL,


Write an interactive c program that will encode or decode a line of text. To encode a line of text, proceed as follows: Convert each character, including blank spaces, to its ASCII equivalent. Generate a positive random integer. Add this integer to the ASCII equivalent of each character. The same random integer will be used for the entire line of text. Suppose that N1 represents the lowest permissible value in the ASCII code, and N2 represents the highest permissible value. If the number obtained in step 2 above exceeds N2, then subtract the largest possible multiple of N2 from this number, and add the remainder to N1. Hence the encoded number will always fall between N1 and N2, and will therefore always represent some ASCII character. Display the characters that correspond to the encoded ASCII values. The procedure is reversed when decoding a line of text. Be certain, however, that the same random number is used in decoding as was used in encoding.

1 Answers   Amazon, CSJM, HCL, Microsoft, TCS, Wipro,


what is mallloc()?how it works?

4 Answers   Excel,


What is the 'named constructor idiom'?

0 Answers  


Explain continue keyword in c

0 Answers  


Can you assign a different address to an array tag?

0 Answers  


what is the use of using linked list and array?

10 Answers   Infosys, TCS,


Categories