write a c program to convert fahrenheit to celsius?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
Describe the order of precedence with regards to operators in C.
What are the advantages of c preprocessor?
4) Write a program that takes a 5 digit number and calculates 2 power that number and prints it.
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?
What does the function toupper() do?
main() { printf(5+"good morning"); printf("%c","abcdefgh"[4]); }the o/p is morning and e...how someone explain
What is a node in c?
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
Write a program to exchange two variaables without temp
int a=0,b=2; if (a=0) b=0; else b=*10; What is the value of b ?
What are pointers? What are stacks and queues?
Why is #define used?