Answer to Question #250211 in C for daeone

Question #250211

: India is a country with moderate weather. So, people here measure temperature in Celsius scale. America is country with cold weather. So, people there measure temperature in Fahrenheit scale. Some students of LPU are going for an international exposure visit to America. Since it is the first time for them, they find it very difficult to follow their temperature readings. Write a program to help them understand the American temperature readings easier, based on their Indian way of understanding. [10]


1
Expert's answer
2021-10-12T13:51:01-0400
#include <stdio.h>


int main()
{
    //define a variable to hold temperature
    float temperature;
    //get temperature in Celsius from the user
    printf("\nEnter temperature in Celsius: ");
    scanf("%f",&temperature);
    //convert temperature from Celsius to Fahrenheit
    float temperature2= (temperature * 1.8) + 32;
    //display the result to the user
    printf("\nThe temperature in Fahrenheit is: %0.2f ",temperature2);
    return 0;
}


Sample Output



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS