• Language

    C

  • Description

    Conversion from Fahrenheit degrees to Celsius degrees

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdio.h>
#include <stdlib.h>

int main (void)
{
    float celsius_degrees, fahrenheit_degrees;
    printf ("Enter the value of fahrenheit degrees: ");
    scanf ("%f", &fahrenheit_degrees);
    (void) getchar ();
    celsius_degrees=(fahrenheit_degrees-32)/1.8;
    printf ("Value of celsius degrees: %g\n", celsius_degrees);
    putchar ('\n');
    system ("pause");
    return EXIT_SUCCESS;
}