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

Combine like terms. y + 3 + 9(y + 5) =
Rearrange these equations in the form y=mc+c (see attached file)
Which expression will you generate if you apply the Distributive Property and combine the like terms in the expression x + 3y − y + 3x + 2(2 + 4 + y)?
Which System of linear equations appears to have a solution of (-1, 4)?
Los mayas y los aztecas Repaso de gramática Lee el párrafo y conjuga el verbo indicado usando el pretérito o el imperfecto. Los mayas y los aztecas __________
The oak table was moved to Denver. The adverb would be "moved"?
How much dna is in each of our cells
Answer all of these please, I’m giving all my points away.
Two squares have perimeters of 20 centimeters and 48 centimeters. How much longer is a side of the larger square than a side of the smaller square?O 6 centimete
In what nation did high school seniors return to class this week, though dozens of schools closed two hours after they opened because of coronavirus concerns?