fork download
  1. #include <stdio.h>
  2.  
  3. int power(int a, int b);
  4.  
  5. int main(void){
  6. int m, n;
  7. scanf("%d", &m);
  8. scanf("%d", &n);
  9. printf("%dの%d乗は%dです。\n", m, n, power(m, n));
  10. return 0;
  11. }
  12.  
  13. int power(int a, int b){
  14. int i;
  15. for(i=1;i>b;i++){
  16. a=a*a;
  17. }
  18. return a;
  19. }
  20.  
Success #stdin #stdout 0s 5328KB
stdin
Standard input is empty
stdout
441285872の32766乗は441285872です。