Sample test

Sample test

by Mr. Mohammed Siddique -
Number of replies: 1

//program which returns the volume of cylinder.  V= 3.14*r*r*h

#include<iostream>

using namespace std;

double Volume(double, double);

void main()
{
double volumeofcylinder,radius,heights;

cin >> radiuse;
_________________

volumeofcylinder = Volume(radius,height);

cout << "The voume of cylinder is : " << _____________________ << "\n";
return;
}

//to find out volume of cylinder
double Volume(double r, double h)
{
double v;
v=3.14*r*r*h;
___________________
}

In reply to Mr. Mohammed Siddique

Re: Sample test

by Mr. Mohammed Siddique -

The answer is:

//program which returns the volume of cylinder. V= 3.14*r*r*h

#include<iostream>

using namespace std;

double Volume(double, double);

void main()
{
double volumeofcylinder,radius,height;

cin >> radius;
cin >> height;

volumeofcylinder = Volume(radius,height);

cout << "The voume of cylinder is : " << volumeofcylinder << "\n";
return;
}

//to find out volume of cylinder
double Volume(double r, double h)
{
double v;
v=3.14*r*r*h;
return(v);
}