Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
117636 欧阳俊懿 桃子问题 C++ Compile Error 0 MS 0 KB 405 2025-04-19 16:37:03

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int age(int x){ if(x==10)return 1; else{ return (age(n+1)+1)*2; } } int main(){ cout<<age(1); return 0; }


Run Info:

Main.cc: In function 'int age(int)':
Main.cc:10:25: error: 'n' was not declared in this scope
             return (age(n+1)+1)*2;
                         ^