Borderou de evaluare (job #2463375)

Utilizator ContNou1Cont nou 1 ContNou1 Data 28 septembrie 2019 11:34:47
Problema Divizori Primi Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:8:18: error: 'int div' redeclared as different kind of symbol int n,p,d=2,pr=0,div,x,i; ^~~ In file included from /usr/include/c++/6/cstdlib:75:0, from /usr/include/c++/6/ext/string_conversions.h:41, from /usr/include/c++/6/bits/basic_string.h:5420, from /usr/include/c++/6/string:52, from /usr/include/c++/6/bits/locale_classes.h:40, from /usr/include/c++/6/bits/ios_base.h:41, from /usr/include/c++/6/ios:42, from /usr/include/c++/6/ostream:38, from /usr/include/c++/6/iostream:39, from main.cpp:5: /usr/include/stdlib.h:788:14: note: previous declaration 'div_t div(int, int)' extern div_t div (int __numer, int __denom) ^~~ main.cpp: In function 'int main()': main.cpp:18:16: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator>' if(pr>div) ~~^~~~ main.cpp:25:8: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator==' if(pr==div) ~~^~~~~ main.cpp:25:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if(pr==div) ^~ main.cpp:27:7: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if' return 0; ^~~~~~ main.cpp: At global scope: main.cpp:30:3: error: expected ',' or ';' before 'ofstream' ofstream g("divprim.out") ^~~~~~~~ main.cpp:32:3: error: 'f' does not name a type f<<n; ^ main.cpp:33:13: error: array bound is not an integer constant before ']' token int a[2][n]; ^ main.cpp:34:3: error: expected unqualified-id before 'for' for(int i=0;i<n;i++) ^~~ main.cpp:34:15: error: 'i' does not name a type for(int i=0;i<n;i++) ^ main.cpp:34:19: error: 'i' does not name a type for(int i=0;i<n;i++) ^ main.cpp:36:7: error: expected unqualified-id before 'for' for(int i=0;i<n;i++) Non zero exit status: 1

Ceva nu functioneaza?