#942
cifre23
Se dă un număr natural format din cifrele 2
sau 3
. Aflaţi cifra care apare de cele mai multe ori în scrierea numărului .
Problema | cifre23 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 16 MB
/
Stivă 8 MB
|
Id soluție | #46762998 | Utilizator | |
Fișier | cifre23.cpp | Dimensiune | 395 B |
Data încărcării | 22 Noiembrie 2023, 12:45 | Scor / rezultat | Eroare de compilare |
cifre23.cpp: In function 'int main()': cifre23.cpp:11:9: error: expected '(' before '=' token if=(n%10 ==3) ^ cifre23.cpp:13:7: error: 'else' without a previous 'if' else ^ cifre23.cpp:15:11: error: 'contor' was not declared in this scope contor+2=1; ^ cifre23.cpp:16:9: error: 'count2' was not declared in this scope count2=count2+1; ^ cifre23.cpp:18:15: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if(cif=3) ^ cifre23.cpp:23:5: error: 'count3' was not declared in this scope count3=count3+1; ^ cifre23.cpp:25:4: error: 'count2' was not declared in this scope if(count2=count3;) ^ cifre23.cpp:25:11: error: 'count3' was not declared in this scope if(count2=count3;) ^ cifre23.cpp:25:17: error: expected ')' before ';' token if(count2=count3;) ^ cifre23.cpp:25:18: error: expected primary-expression before ')' token if(count2=count3;) ^ cifre23.cpp:25:18: error: expected ';' before ')' token cifre23.cpp:27:8: error: 'count3' was not declared in this scope {cout<<count3; ^ cifre23.cpp:28:1: error: 'else' without a previous 'if' else cout<<count3; ^ cifre23.cpp:7:11: warning: unused variable 'cout2' [-Wunused-variable] int n,cout2,cout3,cif; ^ cifre23.cpp:7:17: warning: unused variable 'cout3' [-Wunused-variable] int n,cout2,cout3,cif; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema cifre23 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ă.