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

John Rolfe and John Smith were associated with the colony of: New York Virginia Maryland Massachusetts
c) 6p + 4(8 – p) = 22
Find the standard deviation and mean of 3,5,7, and 9.
Supporters of Charles, the Royalists, engaged in a civil war with the Roundheads, supporters of Parliament. Charles I accepted the Petition of Right. The Roundh
7-2.3.10 Find the product 11 2°7
Which of the following is a way that muscle fibers get energy needed for contraction? 1) When a muscle is contracting during peak activity, it quickly uses up s
Show that the folowing complex numbers have the same argument. a. z1 = 3 + 3√3i and z2 = 1 + √3i b. z1 = 1 + i and z2 = 4 + 4i
a/b + c / a/b -c = simplify
Solve 2√x=1-√(4x-1).
How many time zones are there in the u.S. Including inhabited territories?