Monday, July 11, 2011

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;
}

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...