Ask Question

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

+4
Answers (1)
  1. 2 September, 19:56
    0
    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]));

    }

    }
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write a program in c language which takes 5 inputs from the user. The inputs are temperature in Celsius scale. The program computes the ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers