Please help, I need to write a program to calculate exponent. Below is what I have. I don't even know where to begin.

**************************************

Declare x as float
Declare y as integer
Declare i as integer
Declare result as float

Input x // can be any float
Input y // has to be a positive integer

Set result = 1 // initial value

For i = 1 to y
result = result * x

End for

Output result

**********************************************

#include <iostream>

using namespace std ;

int main()
{
Write code to declare all the variables.

// read in the two numbers

cout << endl ;
cout << "Enter number to be raised to power(float) : ";

cin >> y ;
cout << "Enter the exponent (positive integer) : " ;
cin >> x ;

Initialize any variables that need to be initialized.

for ( )
{

Write the code for the for-loop initializations
and the for-loop body. Carefully study and compare
the pseudocode and C++ for loops in the commentary.

}

// display the result

cout << endl ;
cout << "The value of" << x << " to power " << y
<< " is : " << result << endl ;

return (0); // terminate with success
}

*****************************************************