Temperature Converter:

Temperature ConverterTemperature Converter is an essential software or program by which we can convert a temperature  form one unit to another unit.

For Example: Celsius to Fahrenheit, Fahrenheit to Celsius,Celsius to kelvin & Celsius to Ranking.

Dear learner, here I will discuss and give program code  that will convert Temperature from one unit to other unit:

if you want to test it just copy & past on code block or other compiler then

compile and finally run this program.

Conversion Fahrenheit a Celsius formula

Convert temperature formula or formula in converting Celsius to Fahrenheit

is given below:

1. Fahrenheit =(1.8* Celsius)+32.00;

Formula in converting Fahrenheit to Celsius:

Formula in converting Fahrenheit to Celsius is given below:

2. Celsius =(Fahrenheit-32.00)/1.8

Here is program code to convert tempparature:

#include

int main()
{
int n;
float fahrenheit,kelvin, ranking, celsius;

while(1){
printf(“\n ——:Temperature Converter:——- \n”);
printf(“\n What do you want:\n\n 1 For Celsius To fahrenheit \n 2 For fahrenheit to Celsius:\n 3 For Celsius To Kelvin: \n 4 For Celsius To Ranking \n 0 For Exit:”);
scanf(“%d”,&n);
if(n==1|| n==3|| n==4)

{
printf(“Enter A Temperature In Celsius:”);
scanf(“%f”,& celsius);

}
if(n==2)

{
printf(“Enter A Temperature In fahrenheit:”);
scanf(“%f”,&fahrenheit);

}
if(n==0)
break;
switch(n)
{
case 1:fahrenheit=(1.8* celsius)+32.00;printf(“\n Temperature in fahrenheit =%.2f\n “,fahrenheit);break;
case 2:celsius=(fahrenheit-32.00)/1.8;printf(“\n Temperature in Celsius =%.2f \n”, celsius);break;
case 3:kelvin=(273.00+ celsius);printf(“\n Temperature in kelvin =%.2f \n”,kelvin);break;
case 4:ranking=(1.8* celsius)+492.00;printf(“\n Temperature In Ranking =%.2f \n”, ranking);break;
default:printf(“\n unknown”);break;

}}
printf(“\n”);
return 0;
}

#include 

int main()
{
int  n;
float fahrenheit,kelvin, ranking, celsius;

while(1){
printf("\n                   ------:Temperature Converter:-------    \n");
printf("\n What do you want:\n\n 1 For Celsius To fahrenheit \n 2 For fahrenheit to Celsius:\n 3 For Celsius To Kelvin: \n 4 For Celsius To Ranking \n 0 For Exit:");
scanf("%d",&n);
if(n==1|| n==3|| n==4)

{
printf("Enter A Temperature In Celsius:");
scanf("%f",& celsius);

}
if(n==2)

{
printf("Enter A Temperature In fahrenheit:");
scanf("%f",&fahrenheit);

}
if(n==0)
break;
switch(n)
{
case 1:fahrenheit=(1.8* celsius)+32.00;printf("\n Temperature in fahrenheit =%.2f\n ",fahrenheit);break;
case 2:celsius=(fahrenheit-32.00)/1.8;printf("\n Temperature in Celsius       =%.2f \n", celsius);break;
case 3:kelvin=(273.00+ celsius);printf("\n Temperature in kelvin =%.2f \n",kelvin);break;
case 4:ranking=(1.8* celsius)+492.00;printf("\n Temperature In Ranking =%.2f \n", ranking);break;
default:printf("\n unknown");break;

}

}
printf("\n");
return 0;
}

The output of the above program  looks like below:

Temparature converter

Related Post or you may felt interest:

  1. Live cricket Score Update
  2. How to Create a Facebook Fan page
  3. How to Create a Facebook Account
  4. Age Calculator or Birthday calculator
  5. How to Make a CGPA Calculation Calculator in C
  6. How To Calculate GPA For SSC and HSC
  7. How to make a C sharp calculator
  8. Java Simple calculator

Like Our Facebook Page To Get Update

Speak Your Mind