#941
În preajma Crăciunului toţi suntem sau redevenim copii.
Scrie un program care afişează pe ecran o urare pentru cei dragi ţie!
| Problema | Urare | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64515458 | Utilizator | |
| Fișier | urare.cpp | Dimensiune | 406 B |
| Data încărcării | 12 Mai 2026, 09:30 | Scor/rezultat | Eroare de compilare |
urare.cpp: In function ‘int main()’: urare.cpp:14:14: error: ‘nr’ was not declared in this scope; did you mean ‘n’? 14 | cin>>nr; | ^~ | n urare.cpp:16:37: error: expected ‘)’ before ‘;’ token 16 | for(j =nr;j<=10000000;j=j+nr;) | ~ ^ | ) urare.cpp:16:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 16 | for(j =nr;j<=10000000;j=j+nr;) | ^~~ urare.cpp:16:38: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 16 | for(j =nr;j<=10000000;j=j+nr;) | ^ urare.cpp:15:8: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 15 | if(ciur[nr]==0) | ^~ urare.cpp:16:38: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 16 | for(j =nr;j<=10000000;j=j+nr;) | ^ urare.cpp:16:38: error: expected primary-expression before ‘)’ token urare.cpp:21:24: error: expected primary-expression before ‘]’ token 21 | ciur[i] = ciur[] | ^ urare.cpp:9:15: warning: unused variable ‘s’ [-Wunused-variable] 9 | long long s,d; | ^ urare.cpp:9:17: warning: unused variable ‘d’ [-Wunused-variable] 9 | long long s,d; | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Urare 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ă.