Programming in C
Programming in C
4th Edition
ISBN: 9780321776419
Author: Stephen G. Kochan
Publisher: Addison-Wesley
bartleby

Concept explainers

bartleby

Videos

Textbook Question
100%
Book Icon
Chapter 3, Problem 4E

Write a program that converts 27® from degrees Fahrenheit (F) to degrees Celsius (C) using the following formula:

C F

Expert Solution & Answer
Check Mark

Explanation of Solution

Program:

The following program demonstrate the conversion of Fahrenheit into Celsius.

//include the header file

#include <stdio.h>

//definition of main method

int main (void)

{

//declare the required variables

float F, C;

   //get the input from the user

printf (" Enter the temperature value in Fahrenheit: ");

  scanf("%f", &F);

  //convert Fahrenheit into Celsius

  C = (F - 32) / 1.8;

   //display the result

printf (" The Celsius: %f\n",  C);

  //return statement

return 0;

}

Explanation:

In the above program, declare the required header file. Inside the main method, get the temperature from the user then convert Fahrenheit into Celsius using given formula. Finally display the output.

Sample Output

Enter the temperature value in Fahrenheit:  27

The Celsius: -2.777778

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
Write a program that converts degree Kelvin(TK) to degrees Fahrenheit (TF)
Write a program that prompts the user to enter the minutes (e.g., 1 billion), and displays the number of years and days for the minutes. For simplicity, assume a year has 365 days. Use C++ program.
Write a C++ program that asks the user to enter the radius of the circle and then find the Circumference and area of the circle. Cir= 2* pi *R Area= pi*R*R

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
Land Calculation One acre of land is equivalent to 43,560 square feet. Write a program that calculates the numb...

Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)

Does the Do-While loop test its condition before or after it performs an iteration?

Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)

This operator can be used to determine whether a reference variable references an object of a particular class....

Starting Out with Java: From Control Structures through Objects (6th Edition)

Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Constants, Variables, Data types, Keywords in C Programming Language Tutorial; Author: LearningLad;https://www.youtube.com/watch?v=d7tdL-ZEWdE;License: Standard YouTube License, CC-BY