Function that has three inputs which are integers

Assignment Help C/C++ Programming
Reference no: EM13695867

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 <iostream>
#include <cmath>
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.

Reference no: EM13695867

Questions Cloud

Create a website for a fashion designer : Imagine that an associate of yours just designed a table with captions outside the table's borders. The font on the Website is black, and the text inside the table is red.
Draw the recursive process of quicksort : Draw the recursive process of Quicksort and Mergesort for sorting the sequence {5, 1, 2, 9, 7}. You will get a recursion tree for Quicksort and Mergesort respectively. What are their depths?
Create a new web page : Create a new web page with one image and corresponding JavaScript file. You will teach the image to play the "keep away" game. Give the image an ID so that your script can find it with the getElementById method.
For what value is n is 10n : Show how to do this so please show the work involved.
Function that has three inputs which are integers : 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.
Determine the error in your above estimate : Determine the error in your above estimate, and use that value to estimate the error you'd expect for
What is the logarithm base-2 of zero : How would you advise your coworker on which algorithm to choose - What is the logarithm base-2 of zero? of one?
Calculate the wait time between two iterations : Question on Retry factor and Retry and Retry Interval, practical question is asked on this to calculate the wait time between two iterations?
How long does it take the man to reach his in-laws : How long does it take the man to reach his in-laws- A man begins a car trip to visit his in-laws. The total distance is 60 miles, and he starts off at a speed of 60 miles per hour. After driving exactly 1 mile, he loses some of his enthusiasm for t..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd