#2346
ParitateSiruri
Se dau mai multe șiruri de caractere. Pentru fiecare șir, afișați șirul format doar din caracterele aflate pe poziții impare și șirul format din caracterele aflate pe poziții pare. Cele două șiruri vor fi separate printr-un singur spațiu, pe câte o linie.
Problema | ParitateSiruri | Operații I/O |
paritatesiruri.in /paritatesiruri.out
|
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #15909422 | Utilizator | |
Fișier | paritatesiruri.cpp | Dimensiune | 777 B |
Data încărcării | 20 Mai 2019, 12:33 | Scor / rezultat | Eroare de compilare |
paritatesiruri.cpp:9:2: error: stray '\302' in program int K, s, i, p; ^ paritatesiruri.cpp:9:2: error: stray '\240' in program paritatesiruri.cpp:9:2: error: stray '\302' in program paritatesiruri.cpp:9:2: error: stray '\240' in program paritatesiruri.cpp:10:2: error: stray '\302' in program char sir[255], sir1[255], sir2[255]; ^ paritatesiruri.cpp:10:2: error: stray '\240' in program paritatesiruri.cpp:10:2: error: stray '\302' in program paritatesiruri.cpp:10:2: error: stray '\240' in program paritatesiruri.cpp:11:2: error: stray '\302' in program fin>>K; ^ paritatesiruri.cpp:11:2: error: stray '\240' in program paritatesiruri.cpp:11:2: error: stray '\302' in program paritatesiruri.cpp:11:2: error: stray '\240' in program paritatesiruri.cpp:12:2: error: stray '\302' in program for(s=1;s<=K;s++) ^ paritatesiruri.cpp:12:2: error: stray '\240' in program paritatesiruri.cpp:12:2: error: stray '\302' in program paritatesiruri.cpp:12:2: error: stray '\240' in program paritatesiruri.cpp:13:2: error: stray '\302' in program { ^ paritatesiruri.cpp:13:2: error: stray '\240' in program paritatesiruri.cpp:13:2: error: stray '\302' in program paritatesiruri.cpp:13:2: error: stray '\240' in program paritatesiruri.cpp:14:2: error: stray '\302' in program fin>>sir; ^ paritatesiruri.cpp:14:2: error: stray '\240' in program paritatesiruri.cpp:14:2: error: stray '\302' in program paritatesiruri.cpp:14:2: error: stray '\240' in program paritatesiruri.cpp:14:2: error: stray '\302' in program paritatesiruri.cpp:14:2: error: stray '\240' in program paritatesiruri.cpp:14:2: error: stray '\302' in program paritatesiruri.cpp:14:2: error: stray '\240' in program paritatesiruri.cpp:15:2: error: stray '\302' in program sir1[0]='\0'; sir2[0]='\0'; ^ paritatesiruri.cpp:15:2: error: stray '\240' in program paritatesiruri.cpp:15:2: error: stray '\302' in program paritatesiruri.cpp:15:2: error: stray '\240' in program paritatesiruri.cpp:15:2: error: stray '\302' in program paritatesiruri.cpp:15:2: error: stray '\240' in program paritatesiruri.cpp:15:2: error: stray '\302' in program paritatesiruri.cpp:15:2: error: stray '\240' in program paritatesiruri.cpp:16:2: error: stray '\302' in program p=0; ^ paritatesiruri.cpp:16:2: error: stray '\240' in program paritatesiruri.cpp:16:2: error: stray '\302' in program paritatesiruri.cpp:16:2: error: stray '\240' in program paritatesiruri.cpp:16:2: error: stray '\302' in program paritatesiruri.cpp:16:2: error: stray '\240' in program paritatesiruri.cpp:16:2: error: stray '\302' in program paritatesiruri.cpp:16:2: error: stray '\240' in program paritatesiruri.cpp:17:2: error: stray '\302' in program for(i=1;i<strlen(sir);i=i+2) ^ paritatesiruri.cpp:17:2: error: stray '\240' in program paritatesiruri.cpp:17:2: error: stray '\302' in program paritatesiruri.cpp:17:2: error: stray '\240' in program paritatesiruri.cpp:17:2: error: stray '\302' in program paritatesiruri.cpp:17:2: error: stray '\240' in program paritatesiruri.cpp:17:2: error: stray '\302' in program paritatesiruri.cpp:17:2: error: stray '\240' in program paritatesiruri.cpp:18:2: error: stray '\302' in program { ^ paritatesiruri.cpp:18:2: error: stray '\240' in program paritatesiruri.cpp:18:2: error: stray '\302' in program paritatesiruri.cpp:18:2: error: stray '\240' in program paritatesiruri.cpp:18:2: error: stray '\302' in program paritatesiruri.cpp:18:2: error: stray '\240' in program paritatesiruri.cpp:18:2: error: stray '\302' in program paritatesiruri.cpp:18:2: error: stray '\240' in program paritatesiruri.cpp:19:2: error: stray '\302' in program sir1[p]=sir[i]; p++; ^ paritatesiruri.cpp:19:2: error: stray '\240' in program paritatesiruri.cpp:19:2: error: stray '\302' in program paritatesiruri.cpp:19:2: error: stray '\240' in program paritatesiruri.cpp:19:2: error: stray '\302' in program paritatesiruri.cpp:19:2: error: stray '\240' in program paritatesiruri.cpp:19:2: error: stray '\302' in program paritatesiruri.cpp:19:2: error: stray '\240' in program paritatesiruri.cpp:19:2: error: stray '\302' in program paritatesiruri.cpp:19:2: error: stray '\240' in program paritatesiruri.cpp:19:2: error: stray '\302' in program paritatesiruri.cpp:19:2: error: stray '\240' in program paritatesiruri.cpp:20:2: error: stray '\302' in program } ^ paritatesiruri.cpp:20:2: error: stray '\240' in program paritatesiruri.cpp:20:2: error: stray '\302' in program paritatesiruri.cpp:20:2: error: stray '\240' in program paritatesiruri.cpp:20:2: error: stray '\302' in program paritatesiruri.cpp:20:2: error: stray '\240' in program paritatesiruri.cpp:20:2: error: stray '\302' in program paritatesiruri.cpp:20:2: error: stray '\240' in program paritatesiruri.cpp:21:2: error: stray '\302' in program sir1[p]='\0'; ^ paritatesiruri.cpp:21:2: error: stray '\240' in program paritatesiruri.cpp:21:2: error: stray '\302' in program paritatesiruri.cpp:21:2: error: stray '\240' in program paritatesiruri.cpp:21:2: error: stray '\302' in program paritatesiruri.cpp:21:2: error: stray '\240' in program paritatesiruri.cpp:21:2: error: stray '\302' in program paritatesiruri.cpp:21:2: error: stray '\240' in program paritatesiruri.cpp:22:2: error: stray '\302' in program p=0; ^ paritatesiruri.cpp:22:2: error: stray '\240' in program paritatesiruri.cpp:22:2: error: stray '\302' in program paritatesiruri.cpp:22:2: error: stray '\240' in program paritatesiruri.cpp:22:2: error: stray '\302' in program paritatesiruri.cpp:22:2: error: stray '\240' in program paritatesiruri.cpp:22:2: error: stray '\302' in program paritatesiruri.cpp:22:2: error: stray '\240' in program paritatesiruri.cpp:23:2: error: stray '\302' in program for(i=0;i<strlen(sir);i=i+2) ^ paritatesiruri.cpp:23:2: error: stray '\240' in program paritatesiruri.cpp:23:2: error: stray '\302' in program paritatesiruri.cpp:23:2: error: stray '\240' in program paritatesiruri.cpp:23:2: error: stray '\302' in program paritatesiruri.cpp:23:2: error: stray '\240' in program paritatesiruri.cpp:23:2: error: stray '\302' in program paritatesiruri.cpp:23:2: error: stray '\240' in program paritatesiruri.cpp:24:2: error: stray '\302' in program { ^ paritatesiruri.cpp:24:2: error: stray '\240' in program paritatesiruri.cpp:24:2: error: stray '\302' in program paritatesiruri.cpp:24:2: error: stray '\240' in program paritatesiruri.cpp:24:2: error: stray '\302' in program paritatesiruri.cpp:24:2: error: stray '\240' in program paritatesiruri.cpp:24:2: error: stray '\302' in program paritatesiruri.cpp:24:2: error: stray '\240' in program paritatesiruri.cpp:25:2: error: stray '\302' in program sir2[p]=sir[i]; p++; ^ paritatesiruri.cpp:25:2: error: stray '\240' in program paritatesiruri.cpp:25:2: error: stray '\302' in program paritatesiruri.cpp:25:2: error: stray '\240' in program paritatesiruri.cpp:25:2: error: stray '\302' in program paritatesiruri.cpp:25:2: error: stray '\240' in program paritatesiruri.cpp:25:2: error: stray '\302' in program paritatesiruri.cpp:25:2: error: stray '\240' in program paritatesiruri.cpp:25:2: error: stray '\302' in program paritatesiruri.cpp:25:2: error: stray '\240' in program paritatesiruri.cpp:25:2: error: stray '\302' in program paritatesiruri.cpp:25:2: error: stray '\240' in program paritatesiruri.cpp:26:2: error: stray '\302' in program } ^ paritatesiruri.cpp:26:2: error: stray '\240' in program paritatesiruri.cpp:26:2: error: stray '\302' in program paritatesiruri.cpp:26:2: error: stray '\240' in program paritatesiruri.cpp:26:2: error: stray '\302' in program paritatesiruri.cpp:26:2: error: stray '\240' in program paritatesiruri.cpp:26:2: error: stray '\302' in program paritatesiruri.cpp:26:2: error: stray '\240' in program paritatesiruri.cpp:27:2: error: stray '\302' in program sir2[p]='\0'; ^ paritatesiruri.cpp:27:2: error: stray '\240' in program paritatesiruri.cpp:27:2: error: stray '\302' in program paritatesiruri.cpp:27:2: error: stray '\240' in program paritatesiruri.cpp:27:2: error: stray '\302' in program paritatesiruri.cpp:27:2: error: stray '\240' in program paritatesiruri.cpp:27:2: error: stray '\302' in program paritatesiruri.cpp:27:2: error: stray '\240' in program paritatesiruri.cpp:28:2: error: stray '\302' in program fout<<sir1<<' '<<sir2<<'\n'; ^ paritatesiruri.cpp:28:2: error: stray '\240' in program paritatesiruri.cpp:28:2: error: stray '\302' in program paritatesiruri.cpp:28:2: error: stray '\240' in program paritatesiruri.cpp:28:2: error: stray '\302' in program paritatesiruri.cpp:28:2: error: stray '\240' in program paritatesiruri.cpp:28:2: error: stray '\302' in program paritatesiruri.cpp:28:2: error: stray '\240' in program paritatesiruri.cpp:29:2: error: stray '\302' in program } ^ paritatesiruri.cpp:29:2: error: stray '\240' in program paritatesiruri.cpp:29:2: error: stray '\302' in program paritatesiruri.cpp:29:2: error: stray '\240' in program paritatesiruri.cpp:30:2: error: stray '\302' in program fin.close(); ^ paritatesiruri.cpp:30:2: error: stray '\240' in program paritatesiruri.cpp:30:2: error: stray '\302' in program paritatesiruri.cpp:30:2: error: stray '\240' in program paritatesiruri.cpp:31:2: error: stray '\302' in program fout.close(); ^ paritatesiruri.cpp:31:2: error: stray '\240' in program paritatesiruri.cpp:31:2: error: stray '\302' in program paritatesiruri.cpp:31:2: error: stray '\240' in program paritatesiruri.cpp:32:2: error: stray '\302' in program return 0; ^ paritatesiruri.cpp:32:2: error: stray '\240' in program paritatesiruri.cpp:32:2: error: stray '\302' in program paritatesiruri.cpp:32:2: error: stray '\240' in program paritatesiruri.cpp: In function 'int main()': paritatesiruri.cpp:17:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(i=1;i<strlen(sir);i=i+2) ^ paritatesiruri.cpp:23:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(i=0;i<strlen(sir);i=i+2) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ParitateSiruri 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ă.