#1393
Se citește un număr natural n cu o cifră. Afișați pe ecran o figură sub forma de romb formata cu numerele naturale de la 1 la n, ca în exemplu.
| Problema | DesenRomb | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64797900 | Utilizator | |
| Fișier | desenromb.cpp | Dimensiune | 510 B |
| Data încărcării | 02 Iunie 2026, 09:08 | Scor/rezultat | 0 puncte |
desenromb.cpp: In function ‘int main()’: desenromb.cpp:9:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 9 | for(k = n; k >= i; k--) | ^~~ desenromb.cpp:11:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 11 | for(j = 1; j <= i * 2 - 1; j++) | ^~~ desenromb.cpp:11:13: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] desenromb.cpp:13:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 13 | cout << '\n'; | ^~~~ desenromb.cpp:16:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 16 | for(k = n; k >= i; k--) | ^~~ desenromb.cpp:18:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 18 | for(j = 1; j <= i * 2 - 1; j++) | ^~~ desenromb.cpp:18:13: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] desenromb.cpp:20:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 20 | cout << '\n'; | ^~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 2 | 0.002 secunde | Raspuns gresit. | 10 | 0 | ||
| 3 | 0.002 secunde | Raspuns gresit. | 10 | 0 | ||
| 4 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 10 | 0 | Exemplu | |
| 6 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 7 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 8 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 9 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema DesenRomb 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ă.