07/08/29 09:55:36
>>42
#include<stdio.h>
int result;
int power(int x,int n){
if(n==0)
return 0;
result*=x;
n<0?n++:n--;
return power(x,n);
}
int main(void){
for(;;){
int x,n;
result=1;
printf("文字列入力==");
scanf("%d",&x);
printf("文字列入力==");
scanf("%d",&n);
power(x,n);
printf("値:%s%s%d\n",result<0?"-":"",n<0&&(result<-1||result>1)?"1/":"",result<0?-result:result);
}
return 0;
}