include void main() { float celsius,fahrenheit; // Reads temperature in fahrenheit printf("\nEnter temperature in Fahrenheit:"); scanf("%f",&fahrenheit); // Fahrenheit to celsius conversion formula celsius=(fahrenheit - 32)*5/9; // Print the result

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter8: Advanced Method Concepts
Section: Chapter Questions
Problem 8RQ
icon
Related questions
Question

In C++

include<stdio.h>
void main()
{
float celsius,fahrenheit;
// Reads temperature in fahrenheit
printf("\nEnter temperature in Fahrenheit:");
scanf("%f",&fahrenheit);
// Fahrenheit to celsius conversion formula
celsius=(fahrenheit - 32)*5/9;
// Print the result
printf("\nCelsius = %.3f",celsius); //.3f means
correct to 3 decimal places
}
Transcribed Image Text:include<stdio.h> void main() { float celsius,fahrenheit; // Reads temperature in fahrenheit printf("\nEnter temperature in Fahrenheit:"); scanf("%f",&fahrenheit); // Fahrenheit to celsius conversion formula celsius=(fahrenheit - 32)*5/9; // Print the result printf("\nCelsius = %.3f",celsius); //.3f means correct to 3 decimal places }
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage