All pastes #981922 Raw Edit

Something

public text v1 · immutable
·published 2008-04-12 03:41 UTC
rendered paste body
// This is a program to convert user-defined temperature in Celcius
//      into degrees in farenheit - Ben Weir '08
// P.S. Program is trivial, feel free to copy and paste whereever and whenever

#include <stdio.h>

main()
{
    float    c;  // Declare two variables, celcius and farenheit
    float    f;

    printf("Please enter a temperature in Celcius: "); //read input - in celcius
    scanf("%f", &c);
    f = 32 + c * 9/5; // formula for celcius > farenheit
    printf("%.2f celcius is equal to %.2f degress farenheit\n", c, f);


    fflush(stdin); //flush input from scanf
    getchar();    //wait for keystroke for exit
}