Write a program in C++, which takes radius from the user and calculate the area of sphere i.e Area=4pr2

Write a program in C++, which takes the radius from the user and calculates the area of the sphere i.e Area=4pr2

 

(Hint  p = 3.1416

 

Area = 4 * 3.1416 * r * r)

Write a program in C++, which takes radius from the user and calculate the area of sphere i.e Area=4pr2
Write a program in C++, which takes the radius from the user and calculates the area of the sphere i.e Area=4pr2  



SOLUTION :


#include<iostream>

using namespace std;

int main ()

{

   int radius,area;

   cout<<"Enter the Radius :";

   cin>>radius;

   area=4 * 3.1416 * radius * radius;

    cout<<"Area :"<<area<<endl;

    return 0;

}



 random/hot-posts 

PROGRAMMING QUESTIONS/feat-big

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.