#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 | #54919787 | Utilizator | |
Fișier | prosirx.cpp | Dimensiune | 1.29 KB |
Data încărcării | 12 Decembrie 2024, 10:33 | Scor / rezultat | Eroare de compilare |
prosirx.cpp: In function 'int main()': prosirx.cpp:14:5: error: reference to 'cin' is ambiguous cin.getline(s , 300); ^ prosirx.cpp:6: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:23:5: error: reference to 'cout' is ambiguous cout << cnt << endl; ^ prosirx.cpp:7: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:28:13: error: reference to 'cout' is ambiguous cout << 'X'; ^ prosirx.cpp:7: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:30:13: error: reference to 'cout' is ambiguous cout << 'X'; ^ prosirx.cpp:7: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:32:13: error: reference to 'cout' is ambiguous cout << s[i]; ^ prosirx.cpp:7: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:53:5: error: reference to 'cout' is ambiguous cout << endl; ^ prosirx.cpp:7: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:60:13: error: reference to 'cout' is ambiguous cout << a[i] << ' '; ^ prosirx.cpp:7: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ă.