#3063
luna
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 | #54591284 | Utilizator | |
Fișier | luna.cpp | Dimensiune | 678 B |
Data încărcării | 03 Decembrie 2024, 10:34 | Scor / rezultat | Eroare de compilare |
luna.cpp: In function 'int main()': luna.cpp:10:9: error: expected ':' before 'cout' cout << "ianuarie";break; ^ luna.cpp:10:28: error: break statement not within loop or switch cout << "ianuarie";break; ^ luna.cpp:11:5: error: case label '2' not within a switch statement case 2 ^ luna.cpp:12:9: error: expected ':' before 'cout' cout << "februarie";break; ^ luna.cpp:12:29: error: break statement not within loop or switch cout << "februarie";break; ^ luna.cpp:13:5: error: case label '3' not within a switch statement case 3 ^ luna.cpp:14:9: error: expected ':' before 'cout' cout << "martie";break; ^ luna.cpp:14:26: error: break statement not within loop or switch cout << "martie";break; ^ luna.cpp:15:4: error: case label '4' not within a switch statement case 4 ^ luna.cpp:16:9: error: expected ':' before 'cout' cout << "aprilie";break; ^ luna.cpp:16:27: error: break statement not within loop or switch cout << "aprilie";break; ^ luna.cpp:17:4: error: case label '5' not within a switch statement case 5 ^ luna.cpp:18:9: error: expected ':' before 'cout' cout << "mai";break; ^ luna.cpp:18:23: error: break statement not within loop or switch cout << "mai";break; ^ luna.cpp:19:5: error: case label '6' not within a switch statement case 6 ^ luna.cpp:20:9: error: expected ':' before 'cout' cout << "iunie";break; ^ luna.cpp:20:25: error: break statement not within loop or switch cout << "iunie";break; ^ luna.cpp:21:5: error: case label '7' not within a switch statement case 7 ^ luna.cpp:22:9: error: expected ':' before 'cout' cout << "iulie";break; ^ luna.cpp:22:25: error: break statement not within loop or switch cout << "iulie";break; ^ luna.cpp:23:4: error: case label '8' not within a switch statement case 8 ^ luna.cpp:24:9: error: expected ':' before 'cout' cout << "august";break; ^ luna.cpp:24:26: error: break statement not within loop or switch cout << "august";break; ^ luna.cpp:25:5: error: case label '9' not within a switch statement case 9 ^ luna.cpp:26:9: error: expected ':' before 'cout' cout << "septembrie";break; ^ luna.cpp:26:30: error: break statement not within loop or switch cout << "septembrie";break; ^ luna.cpp:27:4: error: case label '10' not within a switch statement case 10 ^ luna.cpp:28:9: error: expected ':' before 'cout' cout << "octombrie";break; ^ luna.cpp:28:29: error: break statement not within loop or switch cout << "octombrie";break; ^ luna.cpp:29:5: error: 'cse' was not declared in this scope cse 11 ^ luna.cpp:29:9: error: expected ';' before numeric constant cse 11 ^ luna.cpp:30:29: error: break statement not within loop or switch cout << "noiembrie";break; ^ luna.cpp:31:5: error: case label '12' not within a switch statement case 12 ^ luna.cpp:32:9: error: expected ':' before 'cout' cout << "decembrie";break; ^ luna.cpp:32:29: error: break statement not within loop or switch cout << "decembrie";break; ^
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ă.