Compiling Celsius.C

Welcome to BISKit! Forums Troubleshooting Compiling Celsius.C

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #45608
    Patrick Huwiler
    Participant

    If you are having issues with the compiling of the celsius.c code, look at your indents and line spacing between statements. Here is a working example:

     

     

    #include <stdio.h>
    #define FREEZING_PT 32.0f
    #define SCALE_FACTOR (5.0f / 9.0f)

    int main(){
    float fahrenheit, celsius;
    //get the limit of fibonacci series
    printf(“Enter Fahrenheit: “);
    scanf(“%f”,&fahrenheit);
    celsius = (fahrenheit – 32)*5/9;
    printf(“Celsius: %f “, celsius);
    return 0;
    }

    #45932
    Holly Johnson
    Keymaster

    Hi Patrick,

    Thanks for posting this. Was there an issue with what was presented on the website that we need to address? Also, I’m a little curious about the comment you included in the code you provided.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.