Answer to Question #315907 in C++ for mady

Question #315907

Write a program to find the product of 2 power numbers if the base and the exponent of these numbers are



provided in the main function, also check that the base of both the power number are the same, as the



product of 2 power numbers can only be calculated if their base is the same. Use pass by reference



mechanism to compute the product of these power numbers then display the result in main function.




Note: Your function should not return a value.

1
Expert's answer
2022-03-22T16:10:13-0400
int main()
{
	double a, b, c ,d;
	double res;
	cin >> a >> b;
	cin >> c >> d;
	res = pow(a, b) * pow(c, d);
	
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog