<=Back
The following is a C++ program segment, Use it to answer the questions that follows.
#include<iostream.h>
class figure
{
Public:
int shape(int dim)
{
return (dim*dim*dim);
}
};
int main ( )
{
figure cub;
int dimension;
dimension=0;
cout<<“Enter the dimension :”;
cin>>dimension;
cout<<“The shape volume is:”<
return 0;
}
Outline the output from the program segment when each of the following dimensions are inputted in the program
i)20
ii)5.5
 Viewed: 447 times
Share in: