0% found this document useful (0 votes)
5 views1 page

Experiment: - 1 1. Write A Program To Area and Volume of Sphere

Uploaded by

mamalal346
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

Experiment: - 1 1. Write A Program To Area and Volume of Sphere

Uploaded by

mamalal346
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Experiment: - 1

1. Write a program to area and volume of sphere


#include <iostream>
using namespace std;

int main()
{
int rad1;
float volsp;
cout << "\n\n Calculate the volume of a sphere :\n";
cout << "---------------------------------------\n";
cout<<" Input the radius of a sphere : ";
cin>>rad1;
volsp=(4*3.14*rad1*rad1*rad1)/3;
cout<<" The volume of a sphere is : "<< volsp << endl;
cout << endl;
return 0;
}
Sample Output:
Calculate the volume of a sphere :
---------------------------------------
Input the radius of a sphere : 6
The volume of a sphere is : 904.32

2.write a program which reads a three digit number and produce following output assuming that no.
as a input 805

You might also like