Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
130215 郝王骏程 求解函数 C++ Compile Error 0 MS 0 KB 448 2025-09-08 21:01:04

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; double f(double m,double n){ if (n==1) return m/(1+m) else return m/(n+f(m,n-1)) } int main(){ duoble a,b; cin>>a>>b; printf("%.2lf",f(a,b)); return 0; }


Run Info:

Main.cc: In function 'double f(double, double)':
Main.cc:10:6: error: expected ';' before 'else'
      else
      ^
Main.cc:14:1: error: expected ';' before '}' token
 }
 ^
Main.cc: In function 'int main()':
Main.cc:16:5: error: 'duoble' was not declared in this scope
     duoble a,b;    
     ^
Main.cc:17:10: error: 'a' was not declared in this scope
     cin>>a>>b;
          ^
Main.cc:17:13: error: 'b' was not declared in this scope
     cin>>a>>b;
             ^