Ask Question
25 April, 10:53

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

+2
Answers (1)
  1. 25 April, 14:07
    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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers