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

How did Ghandi think Indians should try to get independence from Great Britain?
What principle encourages us to resolve a set of stimuli such as trees across a ridgeline into smoothly flowing patterns
José de San Martín was a liberator for which three countries
The legend on a map states that 1 inch is 30 yards. If you measure 4 inches on the map, how many yards would the actual distance be?
What is the solution Y-2 >1
A car (mass = 1150 kg) is traveling at 34.9 m/s when it collides head-on with a sport utility vehicle (mass = 2560 kg) traveling in the opposite direction. in t
You are swimming in the ocean and receive a bite on the leg from something in the water. as you exit the water, you notice there is a red painful area where you
You complete an experiment measuring the spread of the Cordyceps fungus across a forest environment. You measure the amount of growths you observe on the ground
40 POINTS Match the one-to-one functions with the graphs of their inverse functions.
assessment and evaluation are most often used to