#994
FiboVerif1
Se dă un şir cu n
elemente, numere naturale. Să se afişeze elementele şirului care sunt termeni ai şirului lui Fibonacci.
Problema | FiboVerif1 | Operații I/O |
fiboverif1.in /fiboverif1.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50487864 | Utilizator | |
Fișier | fiboverif1.cpp | Dimensiune | 523 B |
Data încărcării | 11 Aprilie 2024, 11:59 | Scor / rezultat | Eroare de compilare |
fiboverif1.cpp: In function 'int main()': fiboverif1.cpp:27:5: error: 'fistream' was not declared in this scope fistream fin("fiboverif1.in"); ^ fiboverif1.cpp:27:14: error: expected ';' before 'fin' fistream fin("fiboverif1.in"); ^ fiboverif1.cpp:28:30: error: no matching function for call to 'std::basic_ostream<char>::basic_ostream(const char [15])' ostream fout("fiboverif1.out"); ^ fiboverif1.cpp:28:30: note: candidates are: In file included from /usr/include/c++/4.8/istream:39:0, from /usr/include/c++/4.8/fstream:38, from fiboverif1.cpp:2: /usr/include/c++/4.8/ostream:384:7: note: std::basic_ostream<_CharT, _Traits>::basic_ostream() [with _CharT = char; _Traits = std::char_traits<char>] basic_ostream() ^ /usr/include/c++/4.8/ostream:384:7: note: candidate expects 0 arguments, 1 provided /usr/include/c++/4.8/ostream:84:7: note: std::basic_ostream<_CharT, _Traits>::basic_ostream(std::basic_ostream<_CharT, _Traits>::__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__streambuf_type = std::basic_streambuf<char>] basic_ostream(__streambuf_type* __sb) ^ /usr/include/c++/4.8/ostream:84:7: note: no known conversion for argument 1 from 'const char [15]' to 'std::basic_ostream<char>::__streambuf_type* {aka std::basic_streambuf<char>*}' fiboverif1.cpp:29:5: error: 'fin' was not declared in this scope fin>>n; ^ fiboverif1.cpp:37:10: error: 'std::ostream' has no member named 'close' fout.close(); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema FiboVerif1 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ă.