Show the output of the following Program
#include
inline float mul(float x, float y)
{
return(x*y);
}
inline double div(double p, double q)
{
return (p/q);
}
int main()
{
float a=12.345;
float b=9.82;
cout<
cout<
return 0;
}
Answers
Answered by
0
Correct Program:
#include <iostream>
using namespace std;
inline float mul(float x, float y)
{
return(x*y);
}
inline double divi(double p, double q)
{
return (p/q);
}
int main()
{
float a=12.345;
float b=9.82;
cout<< "\nMultiplication="<<mul(a, b);
cout<< "\nDivision="<<divi(a, b);
return 0;
}
Explanation:
The two function calls are missing:
1 mul(a, b)
2 divi(a, b)
Output:
multiplication=121.228
division=1.25713
Similar questions