There is nothing wrong with the program except for a few small defects here and there.
Here is the corrected one. Run it via Command Prompt to see the output. Else ask for a garbage input at the end.
Code:
Edit: Snipped for reducing post length and thread redundancy. ;)
See below posts for the corrected version of your program.
Now for an efficient and better implementation of the same program:
Code:
#include<iostream>
#include<math.h>
using namespace std;
int main(void)
{
int Number(0), Power(0);
cout<<"Enter a number: ";
cin>>Number;
cout<<"Enter a power to raise it to: ";
cin>>Power;
cout<<endl<<"Number "<<Number<<" raised to a power of "<<Power<<" is: "<<pow(Number,Power)<<endl;
return 0;
}
Do indent your code next time onwards so that its easy to read.