#include int main(){ int i,x, n,n0; int Prod, ProdSeq; printf("Enter the value of x and n: (both positive int) \n"); scanf("%d %d",&x,&n); n0=n; Prod=1; ProdSeq=x; while(n > 0) { if ((n%2)==1){ Prod=Prod*ProdSeq; } n=n/2; ProdSeq = ProdSeq* ProdSeq; } printf("Result of %d ^%d = %d\n", x, n0, Prod); return 0; }