Problem 14: Fahrenheit

Take temperature of Dhaka city as input in Celsius scale from the user using scanf() function and convert it to Fahrenheit and print it.
[Formula: F = C(9/5) +32]

2,851 total views, 2 views today

Comments

comments

4 thoughts on “Problem 14: Fahrenheit”

  1. #include
    int main()
    {
    double C,F;
    printf(“Input Temperature in celsius scale: “);
    scanf(“%lf”,&C);
    F = C*(9/5) +32;
    printf(“Temperature in Fahrenheit : %lf”,F);
    return (0);
    }

  2. #include
    int main()
    {
    double C,F;
    printf(“Temperature in cls scale: “);
    scanf(“%lf”,&C);
    F = C*(9/5) +32;
    printf(“Temperature in Fahrenheit : %lf”,F);

    return 0;
    }

  3. #include
    int main()
    {
    float celcius,fahrenheit;
    printf(“Enter temperature in degree celcius:\n”);
    scanf(“%f”,&celcius);
    fahrenheit=celcius*1.8+32;
    printf(“The fahrenheit temperature is %0.2f\n”,fahrenheit);
    }

  4. #include

    int main()
    {
    float c;
    printf(“Please input the temperature of Dhaka city in Celsius scale: “);
    scanf(“%f”,&c);
    float F=c*(9/5)+32;
    printf(“\nThe temperature of Dhaka city in Fahrenheit scale: %.2f \n”,F);

    return 0;
    }

Leave a Reply

Your email address will not be published.