#3063
Scrieți un program care citește un număr natural nenul n și care afișează numele lunii calendaristice corespunzătoare numărului n.
| Problema | luna | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64346643 | Utilizator | |
| Fișier | luna.cpp | Dimensiune | 662 B |
| Data încărcării | 30 Aprilie 2026, 19:37 | Scor/rezultat | Eroare de compilare |
luna.cpp: In function ‘int main()’: luna.cpp:11:5: error: break statement not within loop or switch 11 | break; | ^~~~~ luna.cpp:12:1: error: case label ‘2’ not within a switch statement 12 | case 2: | ^~~~ luna.cpp:14:5: error: break statement not within loop or switch 14 | break; | ^~~~~ luna.cpp:15:1: error: case label ‘3’ not within a switch statement 15 | case 3: | ^~~~ luna.cpp:17:5: error: break statement not within loop or switch 17 | break; | ^~~~~ luna.cpp:18:1: error: case label ‘4’ not within a switch statement 18 | case 4: | ^~~~ luna.cpp:20:5: error: break statement not within loop or switch 20 | break; | ^~~~~ luna.cpp:21:1: error: case label ‘5’ not within a switch statement 21 | case 5: | ^~~~ luna.cpp:23:5: error: break statement not within loop or switch 23 | break; | ^~~~~ luna.cpp:24:1: error: case label ‘6’ not within a switch statement 24 | case 6: | ^~~~ luna.cpp:26:5: error: break statement not within loop or switch 26 | break; | ^~~~~ luna.cpp:27:1: error: case label ‘7’ not within a switch statement 27 | case 7: | ^~~~ luna.cpp:29:5: error: break statement not within loop or switch 29 | break; | ^~~~~ luna.cpp:30:1: error: case label ‘8’ not within a switch statement 30 | case 8: | ^~~~ luna.cpp:32:5: error: break statement not within loop or switch 32 | break; | ^~~~~ luna.cpp:33:1: error: case label ‘9’ not within a switch statement 33 | case 9: | ^~~~ luna.cpp:35:5: error: break statement not within loop or switch 35 | break; | ^~~~~ luna.cpp:36:1: error: case label ‘10’ not within a switch statement 36 | case 10: | ^~~~ luna.cpp:38:5: error: break statement not within loop or switch 38 | break; | ^~~~~ luna.cpp:39:1: error: case label ‘11’ not within a switch statement 39 | case 11: | ^~~~ luna.cpp:41:5: error: break statement not within loop or switch 41 | break; | ^~~~~ luna.cpp:42:1: error: case label ‘12’ not within a switch statement 42 | case 12: | ^~~~ luna.cpp:44:5: error: break statement not within loop or switch 44 | break; | ^~~~~ luna.cpp:46:1: error: case label not within a switch statement 46 | default: | ^~~~~~~ luna.cpp: At global scope: luna.cpp:52:1: error: expected unqualified-id before ‘return’ 52 | return 0; | ^~~~~~ luna.cpp:54:1: error: expected declaration before ‘}’ token 54 | } | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema luna 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ă.