#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 | #36194753 | Utilizator | |
Fișier | anagrame.cpp | Dimensiune | 463 B |
Data încărcării | 08 Aprilie 2022, 21:08 | Scor / rezultat | Eroare de compilare |
anagrame.cpp: In function 'int main()': anagrame.cpp:4:5: error: 'cin' was not declared in this scope cin>>s1>>s2; ^ anagrame.cpp:6:18: error: 'strlen' was not declared in this scope if( strlen(s1)!= strlen(s2)) ok = 0; ^ anagrame.cpp:7:23: error: 'strlen' was not declared in this scope char aux[strlen(s1)]; ^ anagrame.cpp:10:27: error: 'strchr' was not declared in this scope if(strchr(s2,s1[i])) ^ anagrame.cpp:12:9: error: 'aux' was not declared in this scope aux[i] = s1[i]; ^ anagrame.cpp:16:15: error: 'aux' was not declared in this scope if(strcmp(aux,s1)!=0) ok = 0; ^ anagrame.cpp:16:21: error: 'strcmp' was not declared in this scope if(strcmp(aux,s1)!=0) ok = 0; ^ anagrame.cpp:17:18: error: 'cout' was not declared in this scope if(ok == 0) cout << "0"; ^ anagrame.cpp:18:11: error: 'cout' was not declared in this scope else cout << "1"; ^
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ă.