Write a c function that has three inputs which are integers


Prepare a C++ program to find the desired result

Program: Write a C++ function that has three inputs which are integers. The function returns true if the first number raised to the power of the second number equals the third number.

You need to see the entire code and it must run please.

This is what I have and I am getting an error when I run the code and I cannot figure out how to fix it. Below is my code, please clarify to me where I am wrong. This is totally new to me and I am need all the help I can get!! Thanks in advance!


#include
#include
using namespace std;

int main()
{
int x;
int y;
int z;
bool check;

cout <<"Enter a number for x, y, z\n";
cin>> x, y, z;

check = (pow(x, y) == z);

if (check == true)

cout << "True";

else

cout << "False";


cin.ignore(2);
return 0;
}

bool check (int x, int y,int z)
{
if (pow(x, y) == z)
return true;
else
return false;
}

You need to make well-formed and clean code. You should not copy and paste the code from other source.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Write a c function that has three inputs which are integers
Reference No:- TGS0949155

Expected delivery within 24 Hours