XxLydiaxXwolf619 XxLydiaxXwolf619
  • 21-08-2019
  • Computers and Technology
contestada

Write a program in c language which takes 5 inputs from the user. The inputs are
temperature in Celsius scale. The program computes the
corresponding Fahrenheit scale and displays as two columns

Respuesta :

tonb
tonb tonb
  • 21-08-2019

double CelciusToFahrenheit(double celcius)  

{

return celcius * 1.8 + 32;

}

int main()

{

double celcius[5];

int i;

for (i = 0; i < 5; i++)

{

 printf("Enter temperature %d in Celcius: ", i+1);

 scanf_s("%lf", &celcius[i]);

}

for (i = 0; i < 5; i++)

{

 printf("%2.1lf\t%2.1lf\n", celcius[i], CelciusToFahrenheit(celcius[i]));

}

}

Answer Link

Otras preguntas

If4 times the reciprocal of a number is 3 more than 5/2 times the reciprocal of that number find the number Show your work
What is the simplest form for the product 3/5 •25/36 is?
what events happened beforeloyalists left boston and philadelphia?
The equation s x  2 5 can be used to estimate the speed, s, of a car in miles per hour, given the length in feet, x, of the tire marks it leaves on the ground.
what is the difference between dividing 16 by 2 and finding the square root of 16
What is the simplest form for the product 3/5 •25/36 is?
The equation s x  2 5 can be used to estimate the speed, s, of a car in miles per hour, given the length in feet, x, of the tire marks it leaves on the ground.
what events happened beforeloyalists left boston and philadelphia?
What is the simplest form for the product 3/5 •25/36 is?
The equation s x  2 5 can be used to estimate the speed, s, of a car in miles per hour, given the length in feet, x, of the tire marks it leaves on the ground.