#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 | #22107847 | Utilizator | |
Fișier | anagrame.cpp | Dimensiune | 507 B |
Data încărcării | 25 Martie 2020, 19:04 | Scor / rezultat | Eroare de compilare |
anagrame.cpp: In function 'int main()': anagrame.cpp:6:3: error: expected unqualified-id before 'int' int i,j,ok=1,x,y; ^ anagrame.cpp:10:6: error: 'i' was not declared in this scope for(i=0;i<strlen(s)&&ok==1;i++) ^ anagrame.cpp:10:23: error: 'ok' was not declared in this scope for(i=0;i<strlen(s)&&ok==1;i++) ^ anagrame.cpp:12:6: error: 'x' was not declared in this scope x=0; ^ anagrame.cpp:13:7: error: 'sj' was not declared in this scope for(sj=0;i<strlen(s);i++) ^ anagrame.cpp:14:18: error: 'j' was not declared in this scope if(s[i]==s[j]) ^ anagrame.cpp:17:7: error: 'j' was not declared in this scope for(j=0;j<strlen(b);j++) ^ anagrame.cpp:19:7: error: 'y' was not declared in this scope y++; ^ anagrame.cpp:21:13: error: 'y' was not declared in this scope if(x!=y) ^ anagrame.cpp:25:9: error: 'ok' was not declared in this scope if(ok==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ă.