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

why is replication a necessary step in cell division
The excretions of living organisms are best categorized as which type of factor in an environment
Is it important or unimportant for people to treat those around them with respect
An antonym for the word melt is A. soften. B. boil. C. freeze. D. thaw.
draw a number line and show to find the difference for 24_6 using the break apart method in this lesson
Which is greater 50% or 13/25
3 gallons equals how many cups
The first captivity narrative in Puritan literature was written by _____.
how do you solve (-4×6)+8÷-2
how to spell exhausted