Need help in C Write a function called ProdDouble that conta
Need help in C++
Write a function called ProdDouble that contains two parameters of type double. The function should return the product of the two parameters. Be sure to strike the Enter key before you click on the Save button.Solution
Answer :-
#include <iostream>
using namespace std;
void main( )
{
double a, b, c;
double ProdDouble(int,int);
cout<<\"Enter the value of x:\";
cin>>a;
cout<<\"Enter the value of y:\";
cin>>b;
c = ProdDouble(a, b);
cout<<\"The product of two parameters is \"<<c;
}
//The function should return the product of the two parameters
double ProdDouble(double x, double y)
{
return (x * y);
}
