12/07/11

C Programming - Program Konversi Suhu Celcius ke Fahrenheit


#include <stdio.h>

int main()
{
    int c, f;

    printf("berikan nilai temperatur dalam celcius :");
    scanf("%d", &c);
    f = (9*c)/5 + 32;
    printf("%d derajat celcius = %d derajat Fahrenheit. \n", c, f);

    return 0;
}

0 comments:

Poskan Komentar