#4558
Se citește de la tastatură un număr natural cu cel mult nouă cifre. Să se determine dacă numărul citit are cifrele în ordine strict crescătoare, în ordine strict descrescătoare sau dacă are toate cifrele egale.
| Problema | Cifre_IX | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #63234368 | Utilizator | |
| Fișier | cifre_ix.cpp | Dimensiune | 556 B |
| Data încărcării | 22 Februarie 2026, 23:12 | Scor/rezultat | Eroare de compilare |
cifre_ix.cpp:20:5: error: stray '\342' in program if(c==nr) cout‹‹"strict crescatoare" ; ^ cifre_ix.cpp:20:5: error: stray '\200' in program cifre_ix.cpp:20:5: error: stray '\271' in program cifre_ix.cpp:20:5: error: stray '\342' in program cifre_ix.cpp:20:5: error: stray '\200' in program cifre_ix.cpp:20:5: error: stray '\271' in program cifre_ix.cpp:21:5: error: stray '\342' in program else if(d==nr) cout‹‹"strict descrescatoane"; ^ cifre_ix.cpp:21:5: error: stray '\200' in program cifre_ix.cpp:21:5: error: stray '\271' in program cifre_ix.cpp:21:5: error: stray '\342' in program cifre_ix.cpp:21:5: error: stray '\200' in program cifre_ix.cpp:21:5: error: stray '\271' in program cifre_ix.cpp:22:9: error: stray '\342' in program else if(e==nr) cout‹‹"egale"; ^ cifre_ix.cpp:22:9: error: stray '\200' in program cifre_ix.cpp:22:9: error: stray '\271' in program cifre_ix.cpp:22:9: error: stray '\342' in program cifre_ix.cpp:22:9: error: stray '\200' in program cifre_ix.cpp:22:9: error: stray '\271' in program cifre_ix.cpp:23:9: error: stray '\342' in program else cout‹‹ "neordonate"'; ^ cifre_ix.cpp:23:9: error: stray '\200' in program cifre_ix.cpp:23:9: error: stray '\271' in program cifre_ix.cpp:23:9: error: stray '\342' in program cifre_ix.cpp:23:9: error: stray '\200' in program cifre_ix.cpp:23:9: error: stray '\271' in program cifre_ix.cpp:23:37: warning: missing terminating ' character [enabled by default] else cout‹‹ "neordonate"'; ^ cifre_ix.cpp:23:9: error: missing terminating ' character else cout‹‹ "neordonate"'; ^ cifre_ix.cpp: In function 'int main()': cifre_ix.cpp:20:25: error: expected ';' before string constant if(c==nr) cout‹‹"strict crescatoare" ; ^ cifre_ix.cpp:20:46: warning: statement has no effect [-Wunused-value] if(c==nr) cout‹‹"strict crescatoare" ; ^ cifre_ix.cpp:21:30: error: expected ';' before string constant else if(d==nr) cout‹‹"strict descrescatoane"; ^ cifre_ix.cpp:21:53: warning: statement has no effect [-Wunused-value] else if(d==nr) cout‹‹"strict descrescatoane"; ^ cifre_ix.cpp:22:34: error: expected ';' before string constant else if(e==nr) cout‹‹"egale"; ^ cifre_ix.cpp:22:41: warning: statement has no effect [-Wunused-value] else if(e==nr) cout‹‹"egale"; ^ cifre_ix.cpp:23:25: error: expected ';' before string constant else cout‹‹ "neordonate"'; ^ cifre_ix.cpp:24:17: warning: statement has no effect [-Wunused-value] return 0; ^ cifre_ix.cpp:24:17: error: expected '}' at end of input
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Cifre_IX 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ă.