- #include<iostream.h>
- #include<iostream.h>
- void main(){
- clrscr();
- int pow,num,i=1;
- long int sum=1;
- cout<<"\nEnter a number: ";
- cin>>num;
- cout<<"\nEnter power: ";
- cin>>pow;
- while(i<=pow){
- sum=sum*num;
- i++;
- }
- cout<<"the power of number is "<<sum;
- getch();
- }