So for my hw assignment i need to build a program that allows the user to input a base number and a power integer. It only needs to be whole powers. I tried this out... but it didn't seem to work. Any thougts?Code:#include <FPT.h>
int main()
{
//p=x^n inputs x,n output P
double x,n,i,p;
outS("Input a base number to be powered\n");
x = inD() ;
outS("Input a power\n");
n = inD();
i=0;
while(i<=n){
x=x*x;
i=i+1;
}
outD(x);
}