Can someone explain me what the
stands for in
Code:
y=-y;
Code:
#include<iostream.h>
using namespace std;
int main(){
int x, y;
float product=1 ;
cout << "Enter a base number: ";
cin >> x;
cout << "Enter an integer exponent: ";
cin >> y;
int i = 1;
if (y<0)
{ y=-y;//HERE I AM
while (y>=i)
{
product *= x;
i++;
}
cout<<x<<"to the power of "<<y<<"equals="<<(1/product);
}
Comment