• Language

    C

  • Description

    Conversion from Celsius degrees to Fahrenheit 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 celsius degrees: ");
    scanf ("%f", &celsius_degrees);
    (void) getchar ();
    fahrenheit_degrees=1.8*celsius_degrees+32;
    printf ("Value of fahrenheit degrees: %g\n", fahrenheit_degrees);
    putchar ('\n');
    system ("pause");
    return EXIT_SUCCESS;
}