fork download
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int base,exponent,counter;
  5. long long power=1;
  6. printf("enter base and exponent value:\n");
  7. scanf("%d%d",&base,&exponent);
  8. for(counter=1;counter<exponent;counter++)
  9. {
  10. power=power*base;
  11. }
  12. printf("%d^%d=%lld",base,exponent,power);
  13. return 0;
  14. }
  15.  
  16.  
Success #stdin #stdout 0s 9416KB
stdin
Standard input is empty
stdout
enter base and exponent value:
0^0=1