Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <cstdlib>
- using namespace std;
- void(double radius,double height,double cyl_vol*,double cyl_surf* );
- int main()
- {
- double r,h, cv, cs;
- do{
- cout << "input radius"; cin>> r;
- cout << "input height"; cin>> h;
- void(double r,double h,double cv*,double cs* )
- cout << "cylinder volume=" << cv << endl;
- cout << "cylinder surface=" << cs << endl;
- }while(r!=0 || h!=0 )
- return 0;
- }
- void(double radius,double height,double cyl_vol*,double cyl_surf* )
- {
- cyl_vol=(radius*radius*M_PI*height);
- cyl_surf=2*radius*radius*M_PI+ 2*M_PI*radius*height;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement