#1376
Se dă n. Afișați un triunghi cu latura de n steluțe gol înăuntru.
| Problema | LaturiTriunghi | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.01 secunde | Limita memorie |
Total: 10 MB
/
Stivă 2 MB
|
| Id soluție | #64713126 | Utilizator | |
| Fișier | laturitriunghi.cpp | Dimensiune | 2.20 KB |
| Data încărcării | 25 Mai 2026, 16:37 | Scor/rezultat | Eroare de compilare |
laturitriunghi.cpp: In function ‘int main()’: laturitriunghi.cpp:9:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 9 | if(n==2) | ^~ laturitriunghi.cpp:11:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 11 | cour<<"* *"; | ^~~~ laturitriunghi.cpp:11:9: error: ‘cour’ was not declared in this scope laturitriunghi.cpp:12:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 12 | if(n==3) | ^~ laturitriunghi.cpp:14:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 14 | cout<<" * *"<<endl; | ^~~~ laturitriunghi.cpp:16:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 16 | if(n==4) | ^~ laturitriunghi.cpp:18:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 18 | cout<<" * *"<<endl; | ^~~~ laturitriunghi.cpp:21:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 21 | if (n==5) | ^~ laturitriunghi.cpp:23:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 23 | cout << " * *" <<endl; | ^~~~ laturitriunghi.cpp:27:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 27 | if (n==6) | ^~ laturitriunghi.cpp:29:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 29 | cout << " * *" <<endl; | ^~~~ laturitriunghi.cpp:34:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 34 | if (n==7) | ^~ laturitriunghi.cpp:36:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 36 | cout << " * *" <<endl; | ^~~~ laturitriunghi.cpp:42:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 42 | if (n==8) | ^~ laturitriunghi.cpp:44:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 44 | cout << " * *" <<endl; | ^~~~ laturitriunghi.cpp:51:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 51 | if (n==9) | ^~ laturitriunghi.cpp:53:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 53 | cout << " * *" <<endl; | ^~~~ laturitriunghi.cpp:61:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 61 | if (n==10) | ^~ laturitriunghi.cpp:63:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 63 | cout << " * *" <<endl; | ^~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema LaturiTriunghi 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ă.