#4558
Cifre_IX
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 |
![]() |
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50341396 | Utilizator | |
Fișier | cifre_ix.cpp | Dimensiune | 433 B |
Data încărcării | 05 Aprilie 2024, 10:29 | Scor / rezultat | Eroare de compilare |
cifre_ix.cpp:2:7: error: expected nested-name-specifier before 'nameepace' using nameepace std; ^ cifre_ix.cpp:2:7: error: 'nameepace' has not been declared cifre_ix.cpp:2:17: error: expected ';' before 'std' using nameepace std; ^ cifre_ix.cpp:2:17: error: 'std' does not name a type cifre_ix.cpp: In function 'int main()': cifre_ix.cpp:5:5: error: 'cin' was not declared in this scope cin>>n; ^ cifre_ix.cpp:5:5: note: suggested alternative: In file included from cifre_ix.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ cifre_ix.cpp:7:11: error: expected '(' before '!' token if!(n/10%10>n%10) cresc=0; ^ cifre_ix.cpp:8:11: error: expected '(' before '!' token if!(n/10%10<n%10)descresc=0; ^ cifre_ix.cpp:9:11: error: expected '(' before '!' token if!(n/10%10==n%10)egale=0; ^ cifre_ix.cpp:12:18: error: 'cout' was not declared in this scope if(cresc==1) cout<<"strict crescatoare"; ^ cifre_ix.cpp:12:18: note: suggested alternative: In file included from cifre_ix.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ cifre_ix.cpp:13:26: error: 'cout' was not declared in this scope else if(descresc==1) cout<<"strict descrescatoare"; ^ cifre_ix.cpp:13:26: note: suggested alternative: In file included from cifre_ix.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ cifre_ix.cpp:14:23: error: 'cout' was not declared in this scope else if(egale==1) cout << "egale"; ^ cifre_ix.cpp:14:23: note: suggested alternative: In file included from cifre_ix.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ cifre_ix.cpp:15:10: error: 'cout' was not declared in this scope else cout<<"neordonate"; ^ cifre_ix.cpp:15:10: note: suggested alternative: In file included from cifre_ix.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ cifre_ix.cpp:15:28: error: expected '}' at end of input else cout<<"neordonate"; ^
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ă.