Detalii evaluare #12508011

Rezumat problemă

#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.

Detalii

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 Barbu Dragos (barbu_dragos)
Fișier cuvant.cpp Dimensiune 617 B
Data încărcării 03 Decembrie 2018, 16:09 Scor / rezultat Eroare de compilare

Evaluare


Mesaj 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))

                                   ^

Cum funcționează evaluarea?

www.pbinfo.ro permite evaluarea a două tipuri de probleme:

  • probleme la care rezolvarea presupune scrierea unui program complet
  • probleme la care rezolvarea presupune scrierea unei secvențe de program - câteva instrucțiuni, o listă de declarații, una sau mai multe funcții, etc.

Problema Cuvant face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:

  • Programul sursă este compilat folosind compilatorul corespunzător. Dacă în urma compilării se obțin erori sau avertismente, acestea sunt afișate în această pagină.
  • Dacă programul a fost compilat, executabilul obținut va fi rulat, furnizându-i-se unul sau mai multe seturi de date de intrare, în concordanță cu restricțiile specifice problemei. Pentru fiecare set de date se obține un anumit punctaj, în raport cu corectitudinea soluției tale.

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ă.