You are on page 1of 1

#include<iostream.

h>
#include<conio.h>
void main()
{
clrscr();
int a,b,ans=1,i;
cout<<"enter an intger";
cin>>a;
cout<<"enter power";
cin>>b;
for(i=1;i<=b;i++)
{
ans=ans*a;
}
cout<<endl<<"Result is-->"<<ans;
getch();
}

You might also like