Assume that the program has functions, one to calculate the cube of given integer and another to find the cube of given float number Test Case 1 Input (stdin) 2 3.5 Expected Output Cube is 8 Cube is 42.875 Test Case 2 Input (stdin) -2 3.5 Expected Output Cube is -8 Cube is 42.875
#include <iostream>
using namespace std;
int main()
{
int a,b;
cin>>a;
b=a*a*a;
cout<<"Cube is "<<b<<"\n";
float c,d;
cin>>c;
d=c*c*c;
cout<<"Cube is "<<d;
return 0;
}