Title description
Program to find the last three digits of an integer at any power, that is, find the last three digits of x^y.
Input requirements
Enter integers x and y.
Output requirements
Output the value of x^y and the last 3 digits of the number.
Input sample
6 6
Sample output
46656 656
Reference program
#include<stdio.h>
#include<math.h>
int main()
{
int x,y,result,result_3;
scanf("%d%d",&x,&y);
result=pow(x,y);
result_3=result%1000;
printf("%d %d\n",result,result_3);
return 0;
}