#2
suma_n
Să se scrie un program care citeşte de la tastatură un şir de numere naturale şi determină suma lor.
Problema | suma_n | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #18600773 | Utilizator | |
Fișier | suma_n.cpp | Dimensiune | 237 B |
Data încărcării | 11 Noiembrie 2019, 13:05 | Scor / rezultat | Eroare de compilare |
suma_n.cpp:8:1: error: stray '\302' in program for(int i=0;i<=n;i++) ^ suma_n.cpp:8:1: error: stray '\240' in program suma_n.cpp:8:1: error: stray '\302' in program suma_n.cpp:8:1: error: stray '\240' in program suma_n.cpp:8:1: error: stray '\302' in program suma_n.cpp:8:1: error: stray '\240' in program suma_n.cpp:10:1: error: stray '\302' in program ^ suma_n.cpp:10:1: error: stray '\240' in program suma_n.cpp:10:1: error: stray '\302' in program suma_n.cpp:10:1: error: stray '\240' in program suma_n.cpp:10:1: error: stray '\302' in program suma_n.cpp:10:1: error: stray '\240' in program suma_n.cpp:10:1: error: stray '\302' in program suma_n.cpp:10:1: error: stray '\240' in program suma_n.cpp:10:1: error: stray '\302' in program suma_n.cpp:10:1: error: stray '\240' in program suma_n.cpp:11:1: error: stray '\302' in program cin>>val; ^ suma_n.cpp:11:1: error: stray '\240' in program suma_n.cpp:11:1: error: stray '\302' in program suma_n.cpp:11:1: error: stray '\240' in program suma_n.cpp:11:1: error: stray '\302' in program suma_n.cpp:11:1: error: stray '\240' in program suma_n.cpp:11:1: error: stray '\302' in program suma_n.cpp:11:1: error: stray '\240' in program suma_n.cpp:11:1: error: stray '\302' in program suma_n.cpp:11:1: error: stray '\240' in program suma_n.cpp:12:1: error: stray '\302' in program s=s+val; ^ suma_n.cpp:12:1: error: stray '\240' in program suma_n.cpp:12:1: error: stray '\302' in program suma_n.cpp:12:1: error: stray '\240' in program suma_n.cpp:12:1: error: stray '\302' in program suma_n.cpp:12:1: error: stray '\240' in program suma_n.cpp:12:1: error: stray '\302' in program suma_n.cpp:12:1: error: stray '\240' in program suma_n.cpp:12:1: error: stray '\302' in program suma_n.cpp:12:1: error: stray '\240' in program suma_n.cpp:13:1: error: stray '\302' in program } ^ suma_n.cpp:13:1: error: stray '\240' in program suma_n.cpp:13:1: error: stray '\302' in program suma_n.cpp:13:1: error: stray '\240' in program suma_n.cpp:13:1: error: stray '\302' in program suma_n.cpp:13:1: error: stray '\240' in program suma_n.cpp:14:1: error: stray '\302' in program cout<<s; ^ suma_n.cpp:14:1: error: stray '\240' in program suma_n.cpp:14:1: error: stray '\302' in program suma_n.cpp:14:1: error: stray '\240' in program suma_n.cpp:14:1: error: stray '\302' in program suma_n.cpp:14:1: error: stray '\240' in program suma_n.cpp:15:1: error: stray '\302' in program return 0; ^ suma_n.cpp:15:1: error: stray '\240' in program suma_n.cpp:15:1: error: stray '\302' in program suma_n.cpp:15:1: error: stray '\240' in program suma_n.cpp:15:1: error: stray '\302' in program suma_n.cpp:15:1: error: stray '\240' in program
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema suma_n 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ă.