#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 | #64694317 | Utilizator | |
| Fișier | luna.c | Dimensiune | 716 B |
| Data încărcării | 24 Mai 2026, 08:50 | Scor/rezultat | 0 puncte |
luna.c: In function ‘main’: luna.c:8:13: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 8 | if (n = 1) | ^ luna.c:10:14: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 10 | else if (n = 2) | ^ luna.c:12:18: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 12 | else if (n = 3) | ^ luna.c:14:18: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 14 | else if (n = 4) | ^ luna.c:16:18: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 16 | else if (n = 5) | ^ luna.c:18:18: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 18 | else if (n = 6) | ^ luna.c:20:18: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 20 | else if (n = 7) | ^ luna.c:22:18: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 22 | else if (n = 8) | ^ luna.c:24:18: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 24 | else if (n = 9) | ^ luna.c:26:18: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 26 | else if (n = 10) | ^ luna.c:28:18: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 28 | else if (n = 11) | ^ luna.c:6:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d", &n); | ^~~~~~~~~~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 2 | 0.002 secunde | Raspuns gresit. | 10 | 0 | ||
| 3 | 0.001 secunde | Raspuns gresit. | 5 | 0 | ||
| 4 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 6 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 7 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
| 8 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 9 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 10 | 0.001 secunde | Raspuns gresit. | 5 | 0 | ||
| 11 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
| 12 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| Punctaj total | 0 | |||||
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ă.