Write a c++ program which reads any two numbers(x,y) and prints x to the power y.
1
Expert's answer
2011-01-17T05:30:35-0500
#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; }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment