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

Why can’t constant values be used to define an array’s initial size?

1325


What does dm mean sexually?

1261


What are variables and it what way is it different from constants?

1191


In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none

1159


what are bit fields in c?

1599


Explain what is wrong in this statement?

1068


List the difference between a 'copy constructor' and a 'assignment operator' in C?

1034


What do you mean by Recursion Function?

1070


Why are all header files not declared in every c program?

1042


If the size of int data type is two bytes, what is the range of signed int data type?

975


Can we access array using pointer in c language?

1041


What is the difference between %d and %i?

1043


How do you define a function?

970


What is the mean of function?

1065


Is malloc memset faster than calloc?

1016