Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

What language is lisp written in?

1257


What are header files and explain what are its uses in c programming?

1128


Do pointers take up memory?

1150


What are local static variables?

1150


A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?

2314


What is a newline escape sequence?

1098


Explain what is the difference between functions getch() and getche()?

1049


What is the purpose of clrscr () printf () and getch ()?

1066


Is c dynamically typed?

1152


Write a Program to accept different goods with the number, price and date of purchase and display them

6230


How can I run c program?

1165


What is the use of typedef in structure in c?

968


What do mean by network ?

1160


How can my program discover the complete pathname to the executable from which it was invoked?

1072


Explain the use of 'auto' keyword

1120