#2813
Se consideră un text cu cel mult 100 de caractere, în care cuvintele sunt formate din litere mari ale alfabetului englez și sunt separate prin câte un spațiu.
Scrieți un program care citește de la tastatură un text de tipul menționat mai sus și afișează pe ecran, pe câte un rând, cuvintele care cuprind cel puțin o notă muzicală. Dacă nu există astfel de cuvinte, se afișează pe ecran mesajul nu exista.
Subiect Bacalaureat 2017, sesiunea specială
| Problema | Note | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #60230751 | Utilizator | |
| Fișier | note.cpp | Dimensiune | 1.31 KB |
| Data încărcării | 22 Octombrie 2025, 10:23 | Scor/rezultat | Eroare de compilare |
note.cpp:2:7: error: expected nested-name-specifier before 'System' using System; ^ note.cpp:2:7: error: 'System' has not been declared note.cpp:3:7: error: expected nested-name-specifier before 'System' using System.Collections.Generic; ^ note.cpp:3:7: error: 'System' has not been declared note.cpp:3:13: error: expected ';' before '.' token using System.Collections.Generic; ^ note.cpp:3:13: error: expected unqualified-id before '.' token note.cpp:4:7: error: expected nested-name-specifier before 'System' using System.Linq; ^ note.cpp:4:7: error: 'System' has not been declared note.cpp:4:13: error: expected ';' before '.' token using System.Linq; ^ note.cpp:4:13: error: expected unqualified-id before '.' token note.cpp:5:7: error: expected nested-name-specifier before 'System' using System.Text; ^ note.cpp:5:7: error: 'System' has not been declared note.cpp:5:13: error: expected ';' before '.' token using System.Text; ^ note.cpp:5:13: error: expected unqualified-id before '.' token note.cpp:11:26: error: 'string' has not been declared static void Main(string[] args) ^ note.cpp:11:35: error: expected ',' or '...' before 'args' static void Main(string[] args) ^ note.cpp:51:5: error: expected ';' after class definition } ^ note.cpp: In static member function 'static void matrice_de_cuvinte::Program::Main(int*)': note.cpp:13:13: error: 'string' was not declared in this scope string[] note = { "DO", "RE", "MI", "FA", "SOL", "LA", "SI" }; // Are 7 elemente ^ note.cpp:13:20: error: expected primary-expression before ']' token string[] note = { "DO", "RE", "MI", "FA", "SOL", "LA", "SI" }; // Are 7 elemente ^ note.cpp:13:22: error: expected ';' before 'note' string[] note = { "DO", "RE", "MI", "FA", "SOL", "LA", "SI" }; // Are 7 elemente ^ note.cpp:15:20: error: expected ';' before 's' string s, cuv; ^ note.cpp:16:13: error: 's' was not declared in this scope s = Console.ReadLine() + " "; ^ note.cpp:16:17: error: 'Console' was not declared in this scope s = Console.ReadLine() + " "; ^ note.cpp:21:17: error: 'cuv' was not declared in this scope cuv = s.Substring(ind_inc, p - ind_inc); ^ note.cpp:21:35: error: 'ind_inc' was not declared in this scope cuv = s.Substring(ind_inc, p - ind_inc); ^ note.cpp:27:41: error: 'note' was not declared in this scope if (cuv.IndexOf(note[i]) != -1) ^ note.cpp:35:25: error: 'terminator' was not declared in this scope terminator = 0; ^ note.cpp:47:17: error: 'terminator' was not declared in this scope if (terminator == 1) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Note 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ă.