Here are few codes written in C++ (dev C) for practice
<-------- Program to calculate x raise to power y where x is base and y is exponent
------------>
#include <iostream>
using namespace std;
int main()
{
int a,b,c,d=1;
cout<<"Enter the Base number"<<endl;
cin>>a;
cout<<"Enter the exponent"<<endl;
cin>>b;
for(c=1; c<=b; c++)
{
d=a*d;
}
cout<<d<<endl;
return 0;
}