#455
Se citesc 3
numere naturale z1 l1 a1
, reprezentând o dată calendaristică corectă, în format zi luna an
. Să se afişeze data zilei următoare.
Problema | Calendar1 | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57145991 | Utilizator | |
Fișier | calendar1.cpp | Dimensiune | 1.40 KB |
Data încărcării | 18 Martie 2025, 12:01 | Scor / rezultat | 60 puncte |
calendar1.cpp: In function 'int main()': calendar1.cpp:11:17: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if(l1 == 1 && z1 < 31 || l1 == 3 && z1 < 31 || l1 == 5 && z1 < 31 || l1 == 7 && z1 < 31 || l1 == 8 && z1 < 31 || l1 == 10 && z1 < 31){ ^ calendar1.cpp:11:61: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if(l1 == 1 && z1 < 31 || l1 == 3 && z1 < 31 || l1 == 5 && z1 < 31 || l1 == 7 && z1 < 31 || l1 == 8 && z1 < 31 || l1 == 10 && z1 < 31){ ^ calendar1.cpp:11:83: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if(l1 == 1 && z1 < 31 || l1 == 3 && z1 < 31 || l1 == 5 && z1 < 31 || l1 == 7 && z1 < 31 || l1 == 8 && z1 < 31 || l1 == 10 && z1 < 31){ ^ calendar1.cpp:11:105: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if(l1 == 1 && z1 < 31 || l1 == 3 && z1 < 31 || l1 == 5 && z1 < 31 || l1 == 7 && z1 < 31 || l1 == 8 && z1 < 31 || l1 == 10 && z1 < 31){ ^ calendar1.cpp:11:128: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if(l1 == 1 && z1 < 31 || l1 == 3 && z1 < 31 || l1 == 5 && z1 < 31 || l1 == 7 && z1 < 31 || l1 == 8 && z1 < 31 || l1 == 10 && z1 < 31){ ^ calendar1.cpp:16:73: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if(l1 == 1 || l1 == 3 || l1 == 5 || l1 == 7 || l1 == 8 || l1 == 10 && z1 == 31){ ^ calendar1.cpp:21:52: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if(l1 == 4 || l1 == 6 || l1 == 9 || l1 == 11 && z1 >= 1){ ^ calendar1.cpp:26:52: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if(l1 == 4 || l1 == 6 || l1 == 9 || l1 == 11 && z1 == 30){ ^ calendar1.cpp:56:40: warning: 'a' may be used uninitialized in this function [-Wmaybe-uninitialized] cout << z << " " << l << " " << a; ^ calendar1.cpp:56:27: warning: 'l' may be used uninitialized in this function [-Wmaybe-uninitialized] cout << z << " " << l << " " << a; ^ calendar1.cpp:22:18: warning: 'z' may be used uninitialized in this function [-Wmaybe-uninitialized] z = z + 1; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 10 | 10 | Exemplu | |
2 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
3 | 0 secunde | OK. | 10 | 10 | ||
4 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
5 | 0 secunde | OK. | 10 | 10 | ||
6 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
7 | 0 secunde | OK. | 10 | 10 | ||
8 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
9 | 0 secunde | OK. | 10 | 10 | ||
10 | 0 secunde | OK. | 10 | 10 | ||
Punctaj total | 60 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Calendar1 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ă.