Practice: Fahrenheit

Converting temperature…

Converting Temperature

Write a C program that converts degrees Celsius to Fahrenheit, like so:

$ ./fahrenheit
C: 0
F: 32.0

Implementation Details

Create a file called fahrenheit.c. Your program must do the following:

Hints

F = ((C * 9) / 5) + 32
#include <stdio.h>

int main(void)
{
   float pi = 3.1415926535;
   printf("%.2f\n", pi);
}

The above code would output 3.14 because the %.2f specifies 2 decimal places in the float placeholder.

How to Test Your Code

Does your code work as prescribed when you input

You can also execute the below to evaluate the correctness of your code using check50. But be sure to compile and test it yourself as well!

check50 scienceacademy/problems/2026ap/fahrenheit

How to Submit

Execute the below:

submit50 scienceacademy/problems/2026ap/fahrenheit