Borderou de evaluare (job #664486)

Utilizator avatar Ingrid Peta Ingrid Ingrid IP ascuns
Problemă Aritmetica2 (clasa a 5-a) Compilator cpp-32
Rundă Arhiva de probleme Status evaluat
Dată 27 sept. 2022 11:32:39 Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:9:5: error: expected ';' before 'a' 9 | in a, b, c, ans; | ^~ | ; main.cpp:9:3: warning: statement has no effect [-Wunused-value] 9 | in a, b, c, ans; | ^~ main.cpp:10:3: error: 'cin' was not declared in this scope 10 | cin >> a >> b >> c; | ^~~ main.cpp:2:1: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'? 1 | #include <fstream> +++ |+#include <iostream> 2 | main.cpp:10:10: error: 'a' was not declared in this scope 10 | cin >> a >> b >> c; | ^ main.cpp:10:15: error: 'b' was not declared in this scope 10 | cin >> a >> b >> c; | ^ main.cpp:10:20: error: 'c' was not declared in this scope 10 | cin >> a >> b >> c; | ^ main.cpp:12:5: error: 'ans' was not declared in this scope; did you mean 'abs'? 12 | ans = a + c; | ^~~ | abs main.cpp:14:5: error: 'ans' was not declared in this scope; did you mean 'abs'? 14 | ans = a - c; | ^~~ | abs main.cpp:16:5: error: 'ans' was not declared in this scope; did you mean 'abs'? 16 | ans = a * c; | ^~~ | abs main.cpp:18:5: error: 'ans' was not declared in this scope; did you mean 'abs'? 18 | ans = a / c; | ^~~ | abs main.cpp:19:10: error: 'ans' was not declared in this scope; did you mean 'abs'? 19 | out << ans; | ^~~ | abs