Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
87733 冯诚阳 哥德巴赫猜想 C++ Compile Error 0 MS 0 KB 393 2024-08-11 19:29:55

Tests(0/0):


Code:

#include<iostream> #include<string> using namespace std; bool f(int x){ for(int i=2;i*i<=x;i++) if(x%i==0) return false; return true; } int main() { int f=0; for(int i=6;i<=100;i+=2){ for(int j=3;j<=i/2;j++){ if(f(j)&&f(i-j)&&i-j>2) cout<<i<<"="<<j<<"+"<<i-j<<endl; } } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:16:19: error: 'f' cannot be used as a function
             if(f(j)&&f(i-j)&&i-j>2)
                   ^
Main.cc:16:27: error: 'f' cannot be used as a function
             if(f(j)&&f(i-j)&&i-j>2)
                           ^