| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 67633 | 何睿哲 | 年龄问题 | C++ | Compile Error | 0 MS | 0 KB | 185 | 2024-03-17 11:38:28 |
#include<iostream> using namespace std; int age(int i) { if(i==1){ return 10; }else{ return 2+age(n-1); } } int main() { int ans=age(5); cout<<ans; return 0; }
Main.cc: In function 'int age(int)':
Main.cc:7:16: error: 'n' was not declared in this scope
return 2+age(n-1);
^