#155
cifmax
Scrieţi un program care citeşte de la tastatură un şir de cel mult 60 de caractere (litere mici şi mari ale alfabetului englez, cifre, puncte, virgule şi spaţii) şi afişează pe ecran cifra care apare de cele mai multe ori în şirul citit.
Variante Bacalaureat 2009
Problema | cifmax | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #43844569 | Utilizator | |
Fișier | cifmax.cpp | Dimensiune | 1.09 KB |
Data încărcării | 19 Mai 2023, 15:18 | Scor / rezultat | Eroare de compilare |
cifmax.cpp: In function 'int main()': cifmax.cpp:15:18: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(a[i]=="0") ^ cifmax.cpp:15:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifmax.cpp:17:18: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(a[i]=="1") ^ cifmax.cpp:17:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifmax.cpp:19:18: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(a[i]=="2") ^ cifmax.cpp:19:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifmax.cpp:21:18: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(a[i]=="3") ^ cifmax.cpp:21:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifmax.cpp:23:18: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(a[i]=="4") ^ cifmax.cpp:23:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifmax.cpp:25:18: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(a[i]=="5") ^ cifmax.cpp:25:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifmax.cpp:27:18: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(a[i]=="6") ^ cifmax.cpp:27:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifmax.cpp:29:18: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(a[i]=="7") ^ cifmax.cpp:29:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifmax.cpp:31:18: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(a[i]=="8") ^ cifmax.cpp:31:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifmax.cpp:33:18: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(a[i]=="9") ^ cifmax.cpp:33:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifmax.cpp:39:15: error: 'maxim' was not declared in this scope if(x1>maxim) ^ cifmax.cpp:41:15: error: 'maxim' was not declared in this scope if(x2>maxim) ^ cifmax.cpp:43:15: error: 'maxim' was not declared in this scope if(x3>maxim) ^ cifmax.cpp:45:15: error: 'maxim' was not declared in this scope if(x4>maxim) ^ cifmax.cpp:47:15: error: 'maxim' was not declared in this scope if(x5>maxim) ^ cifmax.cpp:49:15: error: 'maxim' was not declared in this scope if(x6>maxim) ^ cifmax.cpp:51:15: error: 'maxim' was not declared in this scope if(x7>maxim) ^ cifmax.cpp:53:15: error: 'maxim' was not declared in this scope if(x8>maxim) ^ cifmax.cpp:55:15: error: 'maxim' was not declared in this scope if(x9>maxim) ^ cifmax.cpp:57:15: error: 'maxim' was not declared in this scope if(x0>maxim) ^ cifmax.cpp:61:11: error: 'maxim' was not declared in this scope cout<<maxim; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema cifmax 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ă.