#455
Calendar1
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 | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53485484 | Utilizator | |
Fișier | calendar1.cpp | Dimensiune | 913 B |
Data încărcării | 02 Noiembrie 2024, 12:14 | Scor / rezultat | Eroare de compilare |
calendar1.cpp: In function 'int main()': calendar1.cpp:4:3: error: 'cin' was not declared in this scope cin>>z1>>l1>>a1; ^ calendar1.cpp:5:66: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if(l1==1 || l1==3 || l1==5|| l1== 7|| l1==8 ||l1==10|| l1==12 && z1<31){ ^ calendar1.cpp:6:7: error: 'cout' was not declared in this scope cout<<z1+1<<" "<<l1<<" "<<a1;} ^ calendar1.cpp:8:7: error: 'cout' was not declared in this scope cout<<z1+1<<" "<<l1<<" "<<a1;} ^ calendar1.cpp:10:8: error: 'cout' was not declared in this scope cout<<z1+1<<" "<<l1<<" "<<a1;} ^ calendar1.cpp:11:50: warning: suggest parentheses around '&&' within '||' [-Wparentheses] else if(l1==4 || l1==6|| l1==9 || l1==11 && z1<30 ){ ^ calendar1.cpp:12:13: error: 'cout' was not declared in this scope cout<<z1+1<<" "<<l1<<" "<<a1;} ^ calendar1.cpp:13:59: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if(l1==1 || l1==3 || l1==5|| l1== 7|| l1==8 ||l1==10 && z1==31){ ^ calendar1.cpp:14:7: error: 'cout' was not declared in this scope cout<<1<<" "<<l1+1<<" "<<a1;} ^ calendar1.cpp:16:10: error: 'cout' was not declared in this scope cout<<1<<1<<a1+1; ^ calendar1.cpp:19:7: error: 'cout' was not declared in this scope cout<<1<<" "<<l1+1<<" "<<a1;} ^ calendar1.cpp:21:8: error: 'cout' was not declared in this scope cout<<1<<" "<<l1+1<<" "<<a1;} ^ calendar1.cpp:22:48: warning: suggest parentheses around '&&' within '||' [-Wparentheses] else if(l1==4 || l1==6|| l1==9 || l1==11 && z1==30 ){ ^ calendar1.cpp:23:13: error: 'cout' was not declared in this scope cout<<1<<" "<<l1+1<<" "<<a1;} ^ calendar1.cpp:2:20: warning: unused variable 'z2' [-Wunused-variable] unsigned z1, l1, z2, l2; ^ calendar1.cpp:2:24: warning: unused variable 'l2' [-Wunused-variable] unsigned z1, l1, z2, l2; ^ calendar1.cpp:3:11: warning: unused variable 'a2' [-Wunused-variable] int a1, a2; ^
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ă.