Python

profilelion77
lab_13.txt

#include <iostream> using namespace std; void user_input(double*,double*); void cylinder_volume (double*,double*,double*); void user_out(double*,double*,double*); int main(void) { double rad = 0.0, heig =0.0, volu =0.0; user_input(&rad, &heig); cylinder_volume (&rad, &heig, &volu); user_out(&rad, &heig, &volu); return 0; } void user_input(double*prad, double*pheig) { cout<<" please enter the radius of the cyliner"<<endl; cin>> *prad; cout<<" please enter the height of the cyliner"<<endl; cin>> *pheig; } void cylinder_volume (double*p1,double*p2,double*p3) { *p3 =3.1416*(*p1)*(*p1)* (*p2); } void user_out(double *pr, double *ph, double *pv) { cout<< "The volume of the cylinder" <<endl; cout<< "with radius"<< *pr <<endl; cout<< " with height"<<*ph <<endl; cout<< "is ..............." <<*pv <<endl; }