• Language

    C

  • Description

    It receives 10 temperatures expressed in degree Celsius. It converts them to Fahrenheit and displays the converted temperature to the screen.

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

int main (void)
{
    int i;
    float degree_Celsius, degree_Fahrenheit;
    for (i=1; i<=10; i++)
    {
        printf ("PROCESS %d\n", i);
        printf ("Enter the value of degree Celsius: ");
        scanf ("%f", &degree_Celsius);
        (void) getchar ();
        degree_Fahrenheit=9.0*degree_Celsius/5.0+32;
        printf ("Value of degree Fahrenheit: %g\n", degree_Fahrenheit);
        putchar ('\n');
    }
    return EXIT_SUCCESS;
}