#167
Să se scrie un program care citeşte de la tastatură un număr întreg şi determină semnul său.
| Problema | Semn | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64801646 | Utilizator | |
| Fișier | semn.cpp | Dimensiune | 244 B |
| Data încărcării | 02 Iunie 2026, 11:40 | Scor/rezultat | 100 puncte |
semn.cpp: In function ‘int main()’: semn.cpp:11:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 11 | if(n==0)///in if se pun 2 de egal (==) | ^~ semn.cpp:14:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 14 | return 0; | ^~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.001 secunde | OK. | 20 | 20 | ||
| 3 | 0.001 secunde | OK. | 20 | 20 | ||
| 4 | 0.001 secunde | OK. | 20 | 20 | ||
| 5 | 0.001 secunde | OK. | 10 | 10 | ||
| 6 | 0.001 secunde | OK. | 10 | 10 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Semn 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ă.