#51
Suma
Se citesc numere de la tastatură până la apariția lui zero. Să se determine suma lor.
Problema | Suma | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #51198296 | Utilizator | |
Fișier | suma.cpp | Dimensiune | 186 B |
Data încărcării | 29 Mai 2024, 16:19 | Scor / rezultat | Eroare de compilare |
suma.cpp:5:1: error: stray '\302' in program int S, x; ^ suma.cpp:5:1: error: stray '\240' in program suma.cpp:5:1: error: stray '\302' in program suma.cpp:5:1: error: stray '\240' in program suma.cpp:6:1: error: stray '\302' in program S = 0; ^ suma.cpp:6:1: error: stray '\240' in program suma.cpp:6:1: error: stray '\302' in program suma.cpp:6:1: error: stray '\240' in program suma.cpp:7:1: error: stray '\302' in program cin >> x; ^ suma.cpp:7:1: error: stray '\240' in program suma.cpp:7:1: error: stray '\302' in program suma.cpp:7:1: error: stray '\240' in program suma.cpp:8:1: error: stray '\302' in program while( x != 0){ ^ suma.cpp:8:1: error: stray '\240' in program suma.cpp:8:1: error: stray '\302' in program suma.cpp:8:1: error: stray '\240' in program suma.cpp:9:1: error: stray '\302' in program cin >> x; ^ suma.cpp:9:1: error: stray '\240' in program suma.cpp:9:1: error: stray '\302' in program suma.cpp:9:1: error: stray '\240' in program suma.cpp:10:1: error: stray '\302' in program S = S + x; ^ suma.cpp:10:1: error: stray '\240' in program suma.cpp:10:1: error: stray '\302' in program suma.cpp:10:1: error: stray '\240' in program suma.cpp:11:1: error: stray '\302' in program } ^ suma.cpp:11:1: error: stray '\240' in program suma.cpp:11:1: error: stray '\302' in program suma.cpp:11:1: error: stray '\240' in program suma.cpp:12:1: error: stray '\302' in program cout << S; ^ suma.cpp:12:1: error: stray '\240' in program suma.cpp:12:1: error: stray '\302' in program suma.cpp:12:1: error: stray '\240' in program
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Suma face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.