64 736
Assignments Done
99,3%
Successfully Done
In September 2018

Answer to Question #1344 in C++ for sam20111

Question #1344
Write a c++ program which reads any two numbers(x,y) and prints x to the power y.
Expert's answer
#include <iostream>
#include <cmath>

using namespace std;

int main(int argc, char **argv)
{
& int x;
& int y;
& cout << "Please input any two numbers 'x' and 'y':" << endl;
& cin >> x >> y;
& cout << "'x' in power of 'y' is " << pow(x, y);
& 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 first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions