fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. int a,b,c,i=1;
  6. scanf("%d",&a);
  7. scanf("%d",&b);
  8. c=1;
  9. while(i<=b)
  10. {
  11. c=c*a;
  12. i++;
  13. }
  14. printf("The value of %d to the power of %d is %d.\n", a, b, c);
  15. return 0;
  16. }
  17.  
  18.  
Success #stdin #stdout 0s 5344KB
stdin
4
0
stdout
The value of 4 to the power of 0 is 1.