Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<iostream>
- #include<conio.h>
- using namespace std;
- void volume(int);
- void volume (int ,int,int);
- int main()
- {
- int radius,length,breadth,height;
- cout<<"Enter The Radius Of Sphere :";
- cin>>radius;
- volume(radius);
- cout<<"\nEnter The Length , Breadth And Height Of Cuboid :"<<endl;
- cin>>length>>breadth>>height;
- volume(length,breadth,height);
- getch();
- return 0;
- }
- void volume(int r)
- {
- // float volume=4/3*3.14*(r*r*r);
- float volume=(4*3.14*(r*r*r))/3;
- cout<<"Volume Of Sphere Is :"<<volume;
- }
- void volume(int l,int b,int h)
- {
- int volume=l*b*h;
- cout<<"Volume OF Cuboid Is :"<<volume;
- }
Advertisement
Add Comment
Please, Sign In to add comment