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

Explain what the variable represent in an addition or subtraction expression.
If x² - y² = 55, and x - y = 11, then y =
what whole number is equivalent to 16/1 ?
how do you write 3.04 as a mixed number?
2x=160, can you help me with this, and show steps?
A lever used to lift a heavy box has an input arm of 4 meters and an output arm of 0.8 meters. What is the mechanical advantage of the lever?
What is 1 - 27/44 = in its simplest form?
logb121=2   Can somebody help and explain?
A telephone pole breaks and falls as shown. To the nearest foot, what was the original height of the pole?
Michael made a queen size quilt that was 8  feet long.  its area was 64 square feet.  What was its perimeter