12. Integer division in old programming languages

12.1. Converting degrees using C

#include <stdio.h>

    int main(void){
        float F, C;
        printf("Fahrenheit: ");
        scanf("%f", &F);
        C = 5.0 * (F - 32.0) / 9.0;
        printf("Celsius: %2.1f\n", C);
    }
    On a scale from 1 (needs improvement) to 3 (excellent), how would you rate this chapter?
  • 1
  • 2
  • 3
You have attempted of activities on this page