#3080
VerifNumar
Se dă un șir de caractere. Sa se determine numărul scris cu cifrele existente în șirul dat. Să se afișeze numărul obținut și, pe linia următoare, toate caracterele din șir care nu fac parte din număr, cu excepția spațiilor.
Problema | VerifNumar | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #26370525 | Utilizator | |
Fișier | verifnumar.cpp | Dimensiune | 662 B |
Data încărcării | 03 Decembrie 2020, 09:41 | Scor / rezultat | Eroare de compilare |
verifnumar.cpp:18:4: error: stray '\342' in program if(ok==strlen(s)) cout<<”CORECT”; ^ verifnumar.cpp:18:4: error: stray '\200' in program verifnumar.cpp:18:4: error: stray '\235' in program verifnumar.cpp:18:4: error: stray '\342' in program verifnumar.cpp:18:4: error: stray '\200' in program verifnumar.cpp:18:4: error: stray '\235' in program verifnumar.cpp:22:3: error: stray '\342' in program cout<<s[i]<<” ”; ^ verifnumar.cpp:22:3: error: stray '\200' in program verifnumar.cpp:22:3: error: stray '\235' in program verifnumar.cpp:22:3: error: stray '\342' in program verifnumar.cpp:22:3: error: stray '\200' in program verifnumar.cpp:22:3: error: stray '\235' in program verifnumar.cpp:31:3: error: stray '\342' in program cout<<s[i]<<” ”; ^ verifnumar.cpp:31:3: error: stray '\200' in program verifnumar.cpp:31:3: error: stray '\235' in program verifnumar.cpp:31:3: error: stray '\342' in program verifnumar.cpp:31:3: error: stray '\200' in program verifnumar.cpp:31:3: error: stray '\235' in program verifnumar.cpp:34:3: error: stray '\342' in program cout<<”NaN”; ^ verifnumar.cpp:34:3: error: stray '\200' in program verifnumar.cpp:34:3: error: stray '\235' in program verifnumar.cpp:34:3: error: stray '\342' in program verifnumar.cpp:34:3: error: stray '\200' in program verifnumar.cpp:34:3: error: stray '\235' in program verifnumar.cpp: In function 'int main()': verifnumar.cpp:9:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i=0;i<strlen(s);i++) ^ verifnumar.cpp:18:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(ok==strlen(s)) cout<<”CORECT”; ^ verifnumar.cpp:18:31: error: 'CORECT' was not declared in this scope if(ok==strlen(s)) cout<<”CORECT”; ^ verifnumar.cpp:20:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i=0;i<strlen(s);i++) ^ verifnumar.cpp:22:22: error: expected primary-expression before ';' token cout<<s[i]<<” ”; ^ verifnumar.cpp:26:7: error: 'k' was not declared in this scope if(k>0 and n==0) ^ verifnumar.cpp:29:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i=0;i<strlen(s);i++) ^ verifnumar.cpp:31:22: error: expected primary-expression before ';' token cout<<s[i]<<” ”; ^ verifnumar.cpp:33:3: error: 'else' without a previous 'if' else ^ verifnumar.cpp:34:12: error: 'NaN' was not declared in this scope cout<<”NaN”; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema VerifNumar 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ă.