#3284
calcParImpar
Se dau n
numere naturale. Considerăm poziţiile lor numerotate de la 1
la n
.
Să se determine cea mai mare valoare memorată pe o poziţie pară şi cea mai mică valoare de două cifre aflată pe o poziţie impară.
Concurs de pregatire CNFB clasa a V-a
Problema | calcParImpar | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #23054830 | Utilizator | |
Fișier | calcparimpar.cpp | Dimensiune | 714 B |
Data încărcării | 20 Mai 2020, 15:28 | Scor / rezultat | Eroare de compilare |
calcparimpar.cpp:9:1: error: stray '\302' in program int n,x[20],k=0,maxim=0,minim=99; ^ calcparimpar.cpp:9:1: error: stray '\240' in program calcparimpar.cpp:9:1: error: stray '\302' in program calcparimpar.cpp:9:1: error: stray '\240' in program calcparimpar.cpp:11:1: error: stray '\302' in program cin>>n; ^ calcparimpar.cpp:11:1: error: stray '\240' in program calcparimpar.cpp:11:1: error: stray '\302' in program calcparimpar.cpp:11:1: error: stray '\240' in program calcparimpar.cpp:13:1: error: stray '\302' in program for(int i=1;i<=n;i++) ^ calcparimpar.cpp:13:1: error: stray '\240' in program calcparimpar.cpp:13:1: error: stray '\302' in program calcparimpar.cpp:13:1: error: stray '\240' in program calcparimpar.cpp:15:1: error: stray '\302' in program cin>>x[i]; ^ calcparimpar.cpp:15:1: error: stray '\240' in program calcparimpar.cpp:15:1: error: stray '\302' in program calcparimpar.cpp:15:1: error: stray '\240' in program calcparimpar.cpp:15:1: error: stray '\302' in program calcparimpar.cpp:15:1: error: stray '\240' in program calcparimpar.cpp:15:1: error: stray '\302' in program calcparimpar.cpp:15:1: error: stray '\240' in program calcparimpar.cpp:17:1: error: stray '\302' in program for(int i=1;i<=n;i++) ^ calcparimpar.cpp:17:1: error: stray '\240' in program calcparimpar.cpp:17:1: error: stray '\302' in program calcparimpar.cpp:17:1: error: stray '\240' in program calcparimpar.cpp:19:1: error: stray '\302' in program { ^ calcparimpar.cpp:19:1: error: stray '\240' in program calcparimpar.cpp:19:1: error: stray '\302' in program calcparimpar.cpp:19:1: error: stray '\240' in program calcparimpar.cpp:21:1: error: stray '\302' in program k++; ^ calcparimpar.cpp:21:1: error: stray '\240' in program calcparimpar.cpp:21:1: error: stray '\302' in program calcparimpar.cpp:21:1: error: stray '\240' in program calcparimpar.cpp:21:1: error: stray '\302' in program calcparimpar.cpp:21:1: error: stray '\240' in program calcparimpar.cpp:21:1: error: stray '\302' in program calcparimpar.cpp:21:1: error: stray '\240' in program calcparimpar.cpp:23:1: error: stray '\302' in program if(k%2==0){ ^ calcparimpar.cpp:23:1: error: stray '\240' in program calcparimpar.cpp:23:1: error: stray '\302' in program calcparimpar.cpp:23:1: error: stray '\240' in program calcparimpar.cpp:23:1: error: stray '\302' in program calcparimpar.cpp:23:1: error: stray '\240' in program calcparimpar.cpp:23:1: error: stray '\302' in program calcparimpar.cpp:23:1: error: stray '\240' in program calcparimpar.cpp:25:1: error: stray '\302' in program if(x[k]>maxim) ^ calcparimpar.cpp:25:1: error: stray '\240' in program calcparimpar.cpp:25:1: error: stray '\302' in program calcparimpar.cpp:25:1: error: stray '\240' in program calcparimpar.cpp:25:1: error: stray '\302' in program calcparimpar.cpp:25:1: error: stray '\240' in program calcparimpar.cpp:25:1: error: stray '\302' in program calcparimpar.cpp:25:1: error: stray '\240' in program calcparimpar.cpp:25:1: error: stray '\302' in program calcparimpar.cpp:25:1: error: stray '\240' in program calcparimpar.cpp:25:1: error: stray '\302' in program calcparimpar.cpp:25:1: error: stray '\240' in program calcparimpar.cpp:27:1: error: stray '\302' in program maxim=x[k];} ^ calcparimpar.cpp:27:1: error: stray '\240' in program calcparimpar.cpp:27:1: error: stray '\302' in program calcparimpar.cpp:27:1: error: stray '\240' in program calcparimpar.cpp:27:1: error: stray '\302' in program calcparimpar.cpp:27:1: error: stray '\240' in program calcparimpar.cpp:27:1: error: stray '\302' in program calcparimpar.cpp:27:1: error: stray '\240' in program calcparimpar.cpp:27:1: error: stray '\302' in program calcparimpar.cpp:27:1: error: stray '\240' in program calcparimpar.cpp:27:1: error: stray '\302' in program calcparimpar.cpp:27:1: error: stray '\240' in program calcparimpar.cpp:27:1: error: stray '\302' in program calcparimpar.cpp:27:1: error: stray '\240' in program calcparimpar.cpp:29:1: error: stray '\302' in program else ^ calcparimpar.cpp:29:1: error: stray '\240' in program calcparimpar.cpp:29:1: error: stray '\302' in program calcparimpar.cpp:29:1: error: stray '\240' in program calcparimpar.cpp:29:1: error: stray '\302' in program calcparimpar.cpp:29:1: error: stray '\240' in program calcparimpar.cpp:29:1: error: stray '\302' in program calcparimpar.cpp:29:1: error: stray '\240' in program calcparimpar.cpp:31:1: error: stray '\302' in program {if(x[k]>=10 and x[k]<=99) ^ calcparimpar.cpp:31:1: error: stray '\240' in program calcparimpar.cpp:31:1: error: stray '\302' in program calcparimpar.cpp:31:1: error: stray '\240' in program calcparimpar.cpp:31:1: error: stray '\302' in program calcparimpar.cpp:31:1: error: stray '\240' in program calcparimpar.cpp:31:1: error: stray '\302' in program calcparimpar.cpp:31:1: error: stray '\240' in program calcparimpar.cpp:31:1: error: stray '\302' in program calcparimpar.cpp:31:1: error: stray '\240' in program calcparimpar.cpp:31:1: error: stray '\302' in program calcparimpar.cpp:31:1: error: stray '\240' in program calcparimpar.cpp:33:1: error: stray '\302' in program if(minim>x[k]) ^ calcparimpar.cpp:33:1: error: stray '\240' in program calcparimpar.cpp:33:1: error: stray '\302' in program calcparimpar.cpp:33:1: error: stray '\240' in program calcparimpar.cpp:33:1: error: stray '\302' in program calcparimpar.cpp:33:1: error: stray '\240' in program calcparimpar.cpp:33:1: error: stray '\302' in program calcparimpar.cpp:33:1: error: stray '\240' in program calcparimpar.cpp:33:1: error: stray '\302' in program calcparimpar.cpp:33:1: error: stray '\240' in program calcparimpar.cpp:33:1: error: stray '\302' in program calcparimpar.cpp:33:1: error: stray '\240' in program calcparimpar.cpp:33:1: error: stray '\302' in program calcparimpar.cpp:33:1: error: stray '\240' in program calcparimpar.cpp:35:1: error: stray '\302' in program minim=x[k];} ^ calcparimpar.cpp:35:1: error: stray '\240' in program calcparimpar.cpp:35:1: error: stray '\302' in program calcparimpar.cpp:35:1: error: stray '\240' in program calcparimpar.cpp:35:1: error: stray '\302' in program calcparimpar.cpp:35:1: error: stray '\240' in program calcparimpar.cpp:35:1: error: stray '\302' in program calcparimpar.cpp:35:1: error: stray '\240' in program calcparimpar.cpp:35:1: error: stray '\302' in program calcparimpar.cpp:35:1: error: stray '\240' in program calcparimpar.cpp:35:1: error: stray '\302' in program calcparimpar.cpp:35:1: error: stray '\240' in program calcparimpar.cpp:35:1: error: stray '\302' in program calcparimpar.cpp:35:1: error: stray '\240' in program calcparimpar.cpp:37:1: error: stray '\302' in program } ^ calcparimpar.cpp:37:1: error: stray '\240' in program calcparimpar.cpp:37:1: error: stray '\302' in program calcparimpar.cpp:37:1: error: stray '\240' in program calcparimpar.cpp:39:1: error: stray '\302' in program if(maxim==0 && minim!=99) ^ calcparimpar.cpp:39:1: error: stray '\240' in program calcparimpar.cpp:39:1: error: stray '\302' in program calcparimpar.cpp:39:1: error: stray '\240' in program calcparimpar.cpp:41:1: error: stray '\302' in program cout<<-1<<" "<<minim;; ^ calcparimpar.cpp:41:1: error: stray '\240' in program calcparimpar.cpp:41:1: error: stray '\302' in program calcparimpar.cpp:41:1: error: stray '\240' in program calcparimpar.cpp:41:1: error: stray '\302' in program calcparimpar.cpp:41:1: error: stray '\240' in program calcparimpar.cpp:41:1: error: stray '\302' in program calcparimpar.cpp:41:1: error: stray '\240' in program calcparimpar.cpp:43:1: error: stray '\302' in program if(minim==99 && maxim!=0) ^ calcparimpar.cpp:43:1: error: stray '\240' in program calcparimpar.cpp:43:1: error: stray '\302' in program calcparimpar.cpp:43:1: error: stray '\240' in program calcparimpar.cpp:45:1: error: stray '\302' in program cout<<maxim<<" "<<-1; ^ calcparimpar.cpp:45:1: error: stray '\240' in program calcparimpar.cpp:45:1: error: stray '\302' in program calcparimpar.cpp:45:1: error: stray '\240' in program calcparimpar.cpp:45:1: error: stray '\302' in program calcparimpar.cpp:45:1: error: stray '\240' in program calcparimpar.cpp:45:1: error: stray '\302' in program calcparimpar.cpp:45:1: error: stray '\240' in program calcparimpar.cpp:47:1: error: stray '\302' in program if(minim!=99 && maxim!=0) ^ calcparimpar.cpp:47:1: error: stray '\240' in program calcparimpar.cpp:47:1: error: stray '\302' in program calcparimpar.cpp:47:1: error: stray '\240' in program calcparimpar.cpp:49:1: error: stray '\302' in program cout<<maxim<<" "<<minim; ^ calcparimpar.cpp:49:1: error: stray '\240' in program calcparimpar.cpp:49:1: error: stray '\302' in program calcparimpar.cpp:49:1: error: stray '\240' in program calcparimpar.cpp:51:1: error: stray '\302' in program return 0; ^ calcparimpar.cpp:51:1: error: stray '\240' in program calcparimpar.cpp:51:1: error: stray '\302' in program calcparimpar.cpp:51:1: error: stray '\240' in program
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema calcParImpar 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ă.