#97
Anagrame
Să se scrie un program care verifică dacă două cuvinte date sunt anagrame.
Problema | Anagrame | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #25843487 | Utilizator | |
Fișier | anagrame.cpp | Dimensiune | 217 B |
Data încărcării | 17 Noiembrie 2020, 10:54 | Scor / rezultat | Eroare de compilare |
anagrame.cpp:1:10: error: #include expects "FILENAME" or <FILENAME> #include iostream ^ anagrame.cpp:2:10: error: #include expects "FILENAME" or <FILENAME> #include string.h ^ anagrame.cpp: In function 'int main()': anagrame.cpp:5:2: error: 'cin' was not declared in this scope cin>>s>>s1; ^ anagrame.cpp:6:2: error: 'k' was not declared in this scope k=1; ^ anagrame.cpp:7:6: error: 'i' was not declared in this scope for(i=0;i<=strlen(s);i++) ^ anagrame.cpp:7:21: error: 'strlen' was not declared in this scope for(i=0;i<=strlen(s);i++) ^ anagrame.cpp:8:3: error: 'c' was not declared in this scope {c=s[i];l=strchr(s1,c); ^ anagrame.cpp:8:10: error: 'l' was not declared in this scope {c=s[i];l=strchr(s1,c); ^ anagrame.cpp:8:23: error: 'strchr' was not declared in this scope {c=s[i];l=strchr(s1,c); ^ anagrame.cpp:9:9: error: 'NULL' was not declared in this scope if(l==NULL)k=0; ^ anagrame.cpp:11:25: error: 'strcpy' was not declared in this scope strcpy(s1+l,s1+l+1); ^ anagrame.cpp:13:2: error: 'cout' was not declared in this scope cout<<k; ^ anagrame.cpp:13:9: error: expected '}' at end of input cout<<k; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Anagrame 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ă.