#1456
Cuvant
Se consideră un cuvânt format din cel puțin două și cel mult 100
de caractere, numai litere mici ale alfabetului englez.
Scrieţi un program care citeşte de la tastatură un cuvânt de tipul precizat și afișează pe ecran mesajul DA
în cazul în care cuvântul conține doar consoane şi, eventual, vocala i
, sau mesajul NU
în caz contrar.
Subiect Bacalaureat 2015, sesiunea august-septembrie
Problema | Cuvant | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #12508011 | Utilizator | |
Fișier | cuvant.cpp | Dimensiune | 617 B |
Data încărcării | 03 Decembrie 2018, 16:09 | Scor / rezultat | Eroare de compilare |
cuvant.cpp:2:9: error: #include expects "FILENAME" or <FILENAME> #include <cstring> ^ cuvant.cpp:3:1: error: stray '\302' in program using namespace std; ^ cuvant.cpp:3:1: error: stray '\240' in program cuvant.cpp:3:1: error: stray '\302' in program cuvant.cpp:3:1: error: stray '\240' in program cuvant.cpp:5:1: error: stray '\302' in program int main() ^ cuvant.cpp:5:1: error: stray '\240' in program cuvant.cpp:7:5: error: stray '\302' in program char s[100]; ^ cuvant.cpp:7:5: error: stray '\240' in program cuvant.cpp:7:5: error: stray '\302' in program cuvant.cpp:7:5: error: stray '\240' in program cuvant.cpp:7:5: error: stray '\302' in program cuvant.cpp:7:5: error: stray '\240' in program cuvant.cpp:7:5: error: stray '\302' in program cuvant.cpp:7:5: error: stray '\240' in program cuvant.cpp:7:5: error: stray '\302' in program cuvant.cpp:7:5: error: stray '\240' in program cuvant.cpp:8:5: error: stray '\302' in program cin>>s; ^ cuvant.cpp:8:5: error: stray '\240' in program cuvant.cpp:8:5: error: stray '\302' in program cuvant.cpp:8:5: error: stray '\240' in program cuvant.cpp:8:5: error: stray '\302' in program cuvant.cpp:8:5: error: stray '\240' in program cuvant.cpp:8:5: error: stray '\302' in program cuvant.cpp:8:5: error: stray '\240' in program cuvant.cpp:9:5: error: stray '\302' in program int i,ok=1,k=0; ^ cuvant.cpp:9:5: error: stray '\240' in program cuvant.cpp:9:5: error: stray '\302' in program cuvant.cpp:9:5: error: stray '\240' in program cuvant.cpp:9:5: error: stray '\302' in program cuvant.cpp:9:5: error: stray '\240' in program cuvant.cpp:9:5: error: stray '\302' in program cuvant.cpp:9:5: error: stray '\240' in program cuvant.cpp:9:5: error: stray '\302' in program cuvant.cpp:9:5: error: stray '\240' in program cuvant.cpp:10:5: error: stray '\302' in program for(i=0;i<strlen(s);i++) ^ cuvant.cpp:10:5: error: stray '\240' in program cuvant.cpp:10:5: error: stray '\302' in program cuvant.cpp:10:5: error: stray '\240' in program cuvant.cpp:10:5: error: stray '\302' in program cuvant.cpp:10:5: error: stray '\240' in program cuvant.cpp:10:5: error: stray '\302' in program cuvant.cpp:10:5: error: stray '\240' in program cuvant.cpp:11:9: error: stray '\302' in program { ^ cuvant.cpp:11:9: error: stray '\240' in program cuvant.cpp:11:9: error: stray '\302' in program cuvant.cpp:11:9: error: stray '\240' in program cuvant.cpp:11:9: error: stray '\302' in program cuvant.cpp:11:9: error: stray '\240' in program cuvant.cpp:11:9: error: stray '\302' in program cuvant.cpp:11:9: error: stray '\240' in program cuvant.cpp:12:13: error: stray '\302' in program if(s[i]=='i') ^ cuvant.cpp:12:13: error: stray '\240' in program cuvant.cpp:12:13: error: stray '\302' in program cuvant.cpp:12:13: error: stray '\240' in program cuvant.cpp:13:9: error: stray '\302' in program k++; ^ cuvant.cpp:13:9: error: stray '\240' in program cuvant.cpp:13:9: error: stray '\302' in program cuvant.cpp:13:9: error: stray '\240' in program cuvant.cpp:13:9: error: stray '\302' in program cuvant.cpp:13:9: error: stray '\240' in program cuvant.cpp:13:9: error: stray '\302' in program cuvant.cpp:13:9: error: stray '\240' in program cuvant.cpp:13:9: error: stray '\302' in program cuvant.cpp:13:9: error: stray '\240' in program cuvant.cpp:13:9: error: stray '\302' in program cuvant.cpp:13:9: error: stray '\240' in program cuvant.cpp:13:9: error: stray '\302' in program cuvant.cpp:13:9: error: stray '\240' in program cuvant.cpp:13:9: error: stray '\302' in program cuvant.cpp:13:9: error: stray '\240' in program cuvant.cpp:13:9: error: stray '\302' in program cuvant.cpp:13:9: error: stray '\240' in program cuvant.cpp:14:13: error: stray '\302' in program if(strchr("aeou",s[i])) ^ cuvant.cpp:14:13: error: stray '\240' in program cuvant.cpp:14:13: error: stray '\302' in program cuvant.cpp:14:13: error: stray '\240' in program cuvant.cpp:15:6: error: stray '\302' in program { ^ cuvant.cpp:15:6: error: stray '\240' in program cuvant.cpp:15:6: error: stray '\302' in program cuvant.cpp:15:6: error: stray '\240' in program cuvant.cpp:15:6: error: stray '\302' in program cuvant.cpp:15:6: error: stray '\240' in program cuvant.cpp:15:6: error: stray '\302' in program cuvant.cpp:15:6: error: stray '\240' in program cuvant.cpp:15:6: error: stray '\302' in program cuvant.cpp:15:6: error: stray '\240' in program cuvant.cpp:15:6: error: stray '\302' in program cuvant.cpp:15:6: error: stray '\240' in program cuvant.cpp:15:6: error: stray '\302' in program cuvant.cpp:15:6: error: stray '\240' in program cuvant.cpp:15:6: error: stray '\302' in program cuvant.cpp:15:6: error: stray '\240' in program cuvant.cpp:16:12: error: stray '\302' in program ok=0; ^ cuvant.cpp:16:12: error: stray '\240' in program cuvant.cpp:16:12: error: stray '\302' in program cuvant.cpp:16:12: error: stray '\240' in program cuvant.cpp:16:12: error: stray '\302' in program cuvant.cpp:16:12: error: stray '\240' in program cuvant.cpp:16:12: error: stray '\302' in program cuvant.cpp:16:12: error: stray '\240' in program cuvant.cpp:17:11: error: stray '\302' in program break; ^ cuvant.cpp:17:11: error: stray '\240' in program cuvant.cpp:17:11: error: stray '\302' in program cuvant.cpp:17:11: error: stray '\240' in program cuvant.cpp:17:11: error: stray '\302' in program cuvant.cpp:17:11: error: stray '\240' in program cuvant.cpp:17:11: error: stray '\302' in program cuvant.cpp:17:11: error: stray '\240' in program cuvant.cpp:17:11: error: stray '\302' in program cuvant.cpp:17:11: error: stray '\240' in program cuvant.cpp:18:9: error: stray '\302' in program } ^ cuvant.cpp:18:9: error: stray '\240' in program cuvant.cpp:18:9: error: stray '\302' in program cuvant.cpp:18:9: error: stray '\240' in program cuvant.cpp:18:9: error: stray '\302' in program cuvant.cpp:18:9: error: stray '\240' in program cuvant.cpp:18:9: error: stray '\302' in program cuvant.cpp:18:9: error: stray '\240' in program cuvant.cpp:18:9: error: stray '\302' in program cuvant.cpp:18:9: error: stray '\240' in program cuvant.cpp:18:9: error: stray '\302' in program cuvant.cpp:18:9: error: stray '\240' in program cuvant.cpp:18:9: error: stray '\302' in program cuvant.cpp:18:9: error: stray '\240' in program cuvant.cpp:18:9: error: stray '\302' in program cuvant.cpp:18:9: error: stray '\240' in program cuvant.cpp:19:13: error: stray '\302' in program } ^ cuvant.cpp:19:13: error: stray '\240' in program cuvant.cpp:19:13: error: stray '\302' in program cuvant.cpp:19:13: error: stray '\240' in program cuvant.cpp:19:13: error: stray '\302' in program cuvant.cpp:19:13: error: stray '\240' in program cuvant.cpp:19:13: error: stray '\302' in program cuvant.cpp:19:13: error: stray '\240' in program cuvant.cpp:20:5: error: stray '\302' in program if(ok && k!=strlen(s)) ^ cuvant.cpp:20:5: error: stray '\240' in program cuvant.cpp:20:5: error: stray '\302' in program cuvant.cpp:20:5: error: stray '\240' in program cuvant.cpp:20:5: error: stray '\302' in program cuvant.cpp:20:5: error: stray '\240' in program cuvant.cpp:20:5: error: stray '\302' in program cuvant.cpp:20:5: error: stray '\240' in program cuvant.cpp:20:5: error: stray '\302' in program cuvant.cpp:20:5: error: stray '\240' in program cuvant.cpp:20:5: error: stray '\302' in program cuvant.cpp:20:5: error: stray '\240' in program cuvant.cpp:21:9: error: stray '\302' in program cout<<"DA"; ^ cuvant.cpp:21:9: error: stray '\240' in program cuvant.cpp:21:9: error: stray '\302' in program cuvant.cpp:21:9: error: stray '\240' in program cuvant.cpp:21:9: error: stray '\302' in program cuvant.cpp:21:9: error: stray '\240' in program cuvant.cpp:21:9: error: stray '\302' in program cuvant.cpp:21:9: error: stray '\240' in program cuvant.cpp:21:9: error: stray '\302' in program cuvant.cpp:21:9: error: stray '\240' in program cuvant.cpp:21:9: error: stray '\302' in program cuvant.cpp:21:9: error: stray '\240' in program cuvant.cpp:21:9: error: stray '\302' in program cuvant.cpp:21:9: error: stray '\240' in program cuvant.cpp:21:9: error: stray '\302' in program cuvant.cpp:21:9: error: stray '\240' in program cuvant.cpp:22:5: error: stray '\302' in program else ^ cuvant.cpp:22:5: error: stray '\240' in program cuvant.cpp:22:5: error: stray '\302' in program cuvant.cpp:22:5: error: stray '\240' in program cuvant.cpp:22:5: error: stray '\302' in program cuvant.cpp:22:5: error: stray '\240' in program cuvant.cpp:22:5: error: stray '\302' in program cuvant.cpp:22:5: error: stray '\240' in program cuvant.cpp:23:9: error: stray '\302' in program cout<<"NU"; ^ cuvant.cpp:23:9: error: stray '\240' in program cuvant.cpp:23:9: error: stray '\302' in program cuvant.cpp:23:9: error: stray '\240' in program cuvant.cpp:23:9: error: stray '\302' in program cuvant.cpp:23:9: error: stray '\240' in program cuvant.cpp:23:9: error: stray '\302' in program cuvant.cpp:23:9: error: stray '\240' in program cuvant.cpp:23:9: error: stray '\302' in program cuvant.cpp:23:9: error: stray '\240' in program cuvant.cpp:23:9: error: stray '\302' in program cuvant.cpp:23:9: error: stray '\240' in program cuvant.cpp:23:9: error: stray '\302' in program cuvant.cpp:23:9: error: stray '\240' in program cuvant.cpp:23:9: error: stray '\302' in program cuvant.cpp:23:9: error: stray '\240' in program cuvant.cpp:25:5: error: stray '\302' in program return 0; ^ cuvant.cpp:25:5: error: stray '\240' in program cuvant.cpp: In function 'int main()': cuvant.cpp:10:31: error: 'strlen' was not declared in this scope for(i=0;i<strlen(s);i++) ^ cuvant.cpp:14:38: error: 'strchr' was not declared in this scope if(strchr("aeou",s[i])) ^ cuvant.cpp:20:35: error: 'strlen' was not declared in this scope if(ok && k!=strlen(s)) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Cuvant 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ă.