It gives me parse errors before functions prototype.Code:#include<iostream> #include<conio.h> using std::cout; using std::cin; using std::endl; // function prototype double small(double,double); int main() { // declare varibales double num1,num2; // read values cout<< "Enter two double values:\t"; cin>> num1 >> num2; // display result cout<< small(num1,num2); getch(); } // define small() double small(double value1,double value2) { // declare alias double minValue; // check smallest value double minValue=value1; if(value2<minValue) minValue=value2; return minValue; }
The same code when tries with an integer value gives correct output. What is wrong in this code?