以下の Series を C: series :で書いてみました(1^1),(2^(1/2)),(6^(1/4)),(24^(1/8)),...,((n!)^((1/2)^n))
。
C コード:
#include <stdio.h>
#include <math.h>
int fact(int x){
if (x==1)
return 1;
else return x*fact(x-1);
}
int main(){
int x,y;
scanf("%d",&x);
y=x;
x=fact(x);
y=pow(0.5,y-1);
double h;
h=pow(x,y);
printf("\n%lf" ,h);
return 0;
}
なぜそれ1.00000
はいつも印刷されているのですか?