#1868
prosirx
Se consideră un text în care cuvintele sunt separate prin unul sau mai multe spații.
a)
Să se determine determină numărul de consoane din textul citit.
b)
Să se înlocuiască prima literă a fiecărui cuvânt din textul citit cu litera X (mare);
c)
Să se modifice textul citit prin aranjarea în ordine lexicografică a tuturor cuvintelor din text și separarea lor prin câte un singur spațiu.
Problema | prosirx | Operații I/O |
prosirx.in /prosirx.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #52005878 | Utilizator | |
Fișier | prosirx.cpp | Dimensiune | 1.28 KB |
Data încărcării | 15 Septembrie 2024, 21:38 | Scor / rezultat | Eroare de compilare |
prosirx.cpp: In function 'int main()': prosirx.cpp:9:5: error: reference to 'cin' is ambiguous cin.getline(s , 300); ^ prosirx.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("prosirx.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from prosirx.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ prosirx.cpp:18:5: error: reference to 'cout' is ambiguous cout << cnt << endl; ^ prosirx.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("prosirx.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from prosirx.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ prosirx.cpp:23:13: error: reference to 'cout' is ambiguous cout << 'X'; ^ prosirx.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("prosirx.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from prosirx.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ prosirx.cpp:25:13: error: reference to 'cout' is ambiguous cout << 'X'; ^ prosirx.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("prosirx.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from prosirx.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ prosirx.cpp:27:13: error: reference to 'cout' is ambiguous cout << s[i]; ^ prosirx.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("prosirx.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from prosirx.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ prosirx.cpp:48:5: error: reference to 'cout' is ambiguous cout << endl; ^ prosirx.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("prosirx.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from prosirx.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ prosirx.cpp:55:13: error: reference to 'cout' is ambiguous cout << a[i] << ' '; ^ prosirx.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("prosirx.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from prosirx.cpp:1: /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 prosirx 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ă.