#4548
Se dă un număr natural n. Să se afișeze o săgeată de dimensiune n, ca în exemplu.
| Problema | Sageata1 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64498657 | Utilizator | |
| Fișier | sageata1.cpp | Dimensiune | 412 B |
| Data încărcării | 11 Mai 2026, 12:39 | Scor/rezultat | Eroare de compilare |
sageata1.cpp: In function ‘int main()’: sageata1.cpp:7:5: error: ‘cin’ was not declared in this scope 7 | cin>>n; | ^~~ sageata1.cpp:1:1: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’? +++ |+#include <iostream> 1 | sageata1.cpp:9:5: error: ‘cout’ was not declared in this scope 9 | cout<<" "; | ^~~~ sageata1.cpp:9:5: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’? sageata1.cpp:10:5: error: ‘cout’ was not declared in this scope 10 | cout<<"*\n"; | ^~~~ sageata1.cpp:10:5: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’? sageata1.cpp:11:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 11 | for (i=1; i<=n+2; i++) | ^~~ sageata1.cpp:13:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 13 | cout<<endl; | ^~~~ sageata1.cpp:13:15: error: ‘endl’ was not declared in this scope 13 | cout<<endl; | ^~~~ sageata1.cpp:1:1: note: ‘std::endl’ is defined in header ‘<ostream>’; did you forget to ‘#include <ostream>’? +++ |+#include <ostream> 1 | sageata1.cpp:14:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 14 | for (i=1; i<=n+3; i++) | ^~~ sageata1.cpp:16:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 16 | cout<<endl; | ^~~~ sageata1.cpp:17:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 17 | for (i=1; i<=n+2; i++) | ^~~ sageata1.cpp:19:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 19 | cout<<endl; | ^~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Sageata1 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ă.