#833
Fiind date vârstele a doi copii afișați care dintre ei este cel mai mare și cu cât.
| Problema | Varste copii | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64111552 | Utilizator | |
| Fișier | varste_copii.cpp | Dimensiune | 242 B |
| Data încărcării | 17 Aprilie 2026, 14:38 | Scor/rezultat | 0 puncte |
varste_copii.cpp: In function ‘int main()’: varste_copii.cpp:6:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 6 | if(a>>b) x=a-b; cout<< "Primul copil este mai mare cu"<<x<<"ani"; | ^~ varste_copii.cpp:6:21: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 6 | if(a>>b) x=a-b; cout<< "Primul copil este mai mare cu"<<x<<"ani"; | ^~~~ varste_copii.cpp:7:6: warning: ‘<<’ in boolean context, did you mean ‘<’? [-Wint-in-bool-context] 7 | if(a<<b) x=b-a; cout<<"Primul copil este mai mare cu"<<x<<"ani"; | ~^~~ varste_copii.cpp:7:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 7 | if(a<<b) x=b-a; cout<<"Primul copil este mai mare cu"<<x<<"ani"; | ^~ varste_copii.cpp:7:18: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 7 | if(a<<b) x=b-a; cout<<"Primul copil este mai mare cu"<<x<<"ani"; | ^~~~ varste_copii.cpp:6:64: warning: ‘x’ may be used uninitialized [-Wmaybe-uninitialized] 6 | if(a>>b) x=a-b; cout<< "Primul copil este mai mare cu"<<x<<"ani"; | ^~~~~ varste_copii.cpp:5:6: note: ‘x’ was declared here 5 | int x; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 10 | 0 | Exemplu | |
| 2 | 0.001 secunde | Raspuns gresit. | 30 | 0 | ||
| 3 | 0.001 secunde | Raspuns gresit. | 30 | 0 | ||
| 4 | 0.001 secunde | Raspuns gresit. | 30 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Varste copii 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ă.