pages

Thursday, 8 April 2021

program to calculate the area of the sphere in c-language

Q.no program to calculate the area of the sphere in c-programing

main()

{

    int r,h;

    float a;

    printf("enter the radius and height of the sphere");

    scanf("%d %d",&r,&h);

    a=3.0/4*3.14*r*r*h;

    printf("radius =%d height =%d area of the sphere is %.2f",r,h,a);

    getch();

}

 

No comments:

Post a Comment