Problem 11: Area Of Circle

You are given the radius of a circle, r = 5.5. We know that, pi=3.1416. Now write a program to calculate the area of the given circle and print it up to 2 digit after the decimal point. [The result should look like: XX.XX]

3,234 total views, 3 views today

Comments

comments

4 thoughts on “Problem 11: Area Of Circle”

  1. #include
    int main()
    {
    float radious=5.5;
    float pi=3.1416;
    float area=pi*(radious*radious);

    printf(“The area of circle: %.2f”,area);
    return 0;
    }

  2. #include
    int main()
    {
    float radious=5.5;
    float pi=3.1416;
    float area=pi*(radious*radious);

    printf(“Circle Area: %.2f”,area);
    return 0;
    }

  3. #include
    main()
    {
    float r=5.5,pi=3.1416,area;
    printf(“The radius of a circle is : 5.5\n”);
    area=pi*(r*r);
    printf(“\nThe area of circle: %.2f\n”,area);
    }

  4. #include
    int main()
    {
    float radius,area;
    printf(“Enter the area of circule:\n”);
    scanf(“%f”,&radius);
    area=3.1416*radius;
    printf(“The area of circule is %0.2f\n”,area);
    }

Leave a Reply

Your email address will not be published.