#115
medie
Să se scrie un program care citeşte de la tastatură un şir de numere naturale şi determină media aritmetică a celor pare.
Problema | medie | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50151140 | Utilizator | |
Fișier | medie.cpp | Dimensiune | 331 B |
Data încărcării | 28 Martie 2024, 19:05 | Scor / rezultat | Eroare de compilare |
medie.cpp:12:1: error: stray '\302' in program cin >> x; ^ medie.cpp:12:1: error: stray '\240' in program medie.cpp:12:1: error: stray '\302' in program medie.cpp:12:1: error: stray '\240' in program medie.cpp:12:1: error: stray '\302' in program medie.cpp:12:1: error: stray '\240' in program medie.cpp:12:1: error: stray '\302' in program medie.cpp:12:1: error: stray '\240' in program medie.cpp:12:1: error: stray '\302' in program medie.cpp:12:1: error: stray '\240' in program medie.cpp:12:1: error: stray '\302' in program medie.cpp:12:1: error: stray '\240' in program medie.cpp:12:1: error: stray '\302' in program medie.cpp:12:1: error: stray '\240' in program medie.cpp:13:1: error: stray '\302' in program if (x % 2 ==0) ^ medie.cpp:13:1: error: stray '\240' in program medie.cpp:13:1: error: stray '\302' in program medie.cpp:13:1: error: stray '\240' in program medie.cpp:13:1: error: stray '\302' in program medie.cpp:13:1: error: stray '\240' in program medie.cpp:13:1: error: stray '\302' in program medie.cpp:13:1: error: stray '\240' in program medie.cpp:13:1: error: stray '\302' in program medie.cpp:13:1: error: stray '\240' in program medie.cpp:13:1: error: stray '\302' in program medie.cpp:13:1: error: stray '\240' in program medie.cpp:13:1: error: stray '\302' in program medie.cpp:13:1: error: stray '\240' in program medie.cpp:13:1: error: stray '\302' in program medie.cpp:13:1: error: stray '\240' in program medie.cpp: In function 'int main()': medie.cpp:16:13: error: 'nr' was not declared in this scope nr++; ^ medie.cpp:19:23: error: 'nr' was not declared in this scope cout << 1.0 * s / nr; ^ medie.cpp:20:13: error: expected ';' before ':' token return 0: ^ medie.cpp:20:13: error: expected primary-expression before ':' token medie.cpp:20:13: error: expected ';' before ':' token
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema medie 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ă.