#include <stdio.h>
int power(int a, int b){
int c = 1;
while (b-- > 0)
c = a*c;
return c;
}
int main(void) {
int x,n,y;
x = 2;
n = 4;
y = power(x,n);
printf("%d の %d 乗は %d",x
,n
,y
);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgcG93ZXIoaW50IGEsIGludCBiKXsKICAgIGludCBjID0gMTsKICAgIHdoaWxlIChiLS0gPiAwKQogICAgICAgIGMgPSBhKmM7CgogICAgcmV0dXJuIGM7Cn0KCmludCBtYWluKHZvaWQpIHsKICAgIGludCB4LG4seTsKICAgIHggPSAyOwogICAgbiA9IDQ7CiAgICB5ID0gcG93ZXIoeCxuKTsKICAgIHByaW50ZigiJWQg44GuICVkIOS5l+OBryAlZCIseCxuLHkpOwoKCXJldHVybiAwOwp9Cg==