Answer to Question #292714 in C++ for Zim

Question #292714

Given three floating-point numbers x, y, and z, output x to the power of z, x to the power of (y to the power of z), the absolute value of y, and the square root of (xy to the power of z).


1
Expert's answer
2022-02-01T05:54:20-0500
#include <iostream>
using namespace std;


int main(){
	float x,y,z;
	cout<<"Please x: ";
	cin>>x;
	cout<<"Please y: ";
	cin>>y;
	cout<<"Please z: ";
	cin>>z;




	cout<<"x to the power of z: "<<pow(x,z)<<"\n";
	cout<<"x to the power of (y to the power of z): "<<pow(x,pow(y,z))<<"\n";
	cout<<"The absolute value of y: "<<abs(y)<<"\n";
	cout<<"The square root of (xy to the power of z): "<<sqrt(pow(x*y,z))<<"\n";
	


	system("pause");
	return 0;
}

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