#2029
AfisareN
Citindu-se un număr natural n
şi un şir de caractere să se afişeze de n
ori şirul de caractere.
Problema | AfisareN | Operații I/O |
afisaren.in /afisaren.out
|
---|---|---|---|
Limita timp | 0.27 secunde | Limita memorie |
Total: 0.1 MB
/
Stivă 0.1 MB
|
Id soluție | #53491348 | Utilizator | |
Fișier | afisaren.cpp | Dimensiune | 435 B |
Data încărcării | 02 Noiembrie 2024, 16:46 | Scor / rezultat | Eroare de compilare |
afisaren.cpp:5:13: error: variable 'std::ifstream cin' has initializer but incomplete type ifstream cin("afisaren.in"); ^ afisaren.cpp:6:14: error: variable 'std::ofstream cout' has initializer but incomplete type ofstream cout("afisaren.out"); ^ afisaren.cpp: In function 'int main()': afisaren.cpp:11:5: error: reference to 'cin' is ambiguous cin >> n; ^ afisaren.cpp:5:10: note: candidates are: <typeprefixerror>cin ifstream cin("afisaren.in"); ^ In file included from afisaren.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ afisaren.cpp:12:5: error: reference to 'cin' is ambiguous cin.close(); ^ afisaren.cpp:5:10: note: candidates are: <typeprefixerror>cin ifstream cin("afisaren.in"); ^ In file included from afisaren.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ afisaren.cpp:15:21: error: variable 'std::ifstream cin' has initializer but incomplete type ifstream cin("afisaren.in"); ^ afisaren.cpp:20:9: error: reference to 'cout' is ambiguous cout << ch; ^ afisaren.cpp:6:10: note: candidates are: <typeprefixerror>cout ofstream cout("afisaren.out"); ^ In file included from afisaren.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ afisaren.cpp:21:9: error: reference to 'cout' is ambiguous cout << endl; ^ afisaren.cpp:6:10: note: candidates are: <typeprefixerror>cout ofstream cout("afisaren.out"); ^ In file included from afisaren.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema AfisareN 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ă.