#include <stdio.h>
//正の奇数nを引数とし,以下の正の奇数の和を求める関数
int rec(int n){
if (n == 1){
return 1;
}
else{
return n+rec(n-2);
}
}
int main(void) {
int n = 11;
printf("%d以下の正の奇数の和は%d\n", n
, rec
(n
)); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Ci8v5q2j44Gu5aWH5pWwbuOCkuW8leaVsOOBqOOBl++8jOS7peS4i+OBruato+OBruWlh+aVsOOBruWSjOOCkuaxguOCgeOCi+mWouaVsAppbnQgcmVjKGludCBuKXsKICAgIGlmIChuID09IDEpewogICAgICAgIHJldHVybiAxOwogICAgfQogICAgZWxzZXsKICAgICAgICByZXR1cm4gbityZWMobi0yKTsKICAgIH0KfQppbnQgbWFpbih2b2lkKSB7CiAgICBpbnQgbiA9IDExOwogICAgcHJpbnRmKCIlZOS7peS4i+OBruato+OBruWlh+aVsOOBruWSjOOBryVkXG4iLCBuLCByZWMobikpOwoJcmV0dXJuIDA7Cn0=