#1013
Aniversari
Se dau datele de naștere a n
persoane, numerotate de la 1
la n
, în forma an luna zi
. Să se determine numărul de ordine al celei mai tinere și al celei mai în vârstă persoană dintre cele date.
Problema | Aniversari | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54165662 | Utilizator | |
Fișier | aniversari.cpp | Dimensiune | 983 B |
Data încărcării | 21 Noiembrie 2024, 09:45 | Scor / rezultat | Eroare de compilare |
aniversari.cpp: In function 'int main()': aniversari.cpp:45:1: error: expected '}' at end of input } ^ aniversari.cpp: In member function 'int main()::persoana::main()': aniversari.cpp:12:24: error: request for member 'a' in '((main()::persoana*)this)->main()::persoana::v[((main()::persoana*)this)->main()::persoana::i]', which is of non-class type 'int' cin>>v[i].a>>v[i].z; ^ aniversari.cpp:12:32: error: request for member 'z' in '((main()::persoana*)this)->main()::persoana::v[((main()::persoana*)this)->main()::persoana::i]', which is of non-class type 'int' cin>>v[i].a>>v[i].z; ^ aniversari.cpp:13:15: error: request for member 'a' in '((main()::persoana*)this)->main()::persoana::maxi', which is of non-class type 'int' maxi.a=0; min.a=3000; ^ aniversari.cpp:13:23: error: 'std::min' does not have class type maxi.a=0; min.a=3000; ^ aniversari.cpp:15:19: error: request for member 'a' in '((main()::persoana*)this)->main()::persoana::v[((main()::persoana*)this)->main()::persoana::i]', which is of non-class type 'int' {if(v[i].a>maxi.a) ^ aniversari.cpp:15:26: error: request for member 'a' in '((main()::persoana*)this)->main()::persoana::maxi', which is of non-class type 'int' {if(v[i].a>maxi.a) ^ aniversari.cpp:18:10: error: 'else' without a previous 'if' else ^ aniversari.cpp:19:22: error: request for member 'a' in '((main()::persoana*)this)->main()::persoana::v[((main()::persoana*)this)->main()::persoana::i]', which is of non-class type 'int' if(v[i].a==maxi.a) ^ aniversari.cpp:19:30: error: request for member 'a' in '((main()::persoana*)this)->main()::persoana::maxi', which is of non-class type 'int' if(v[i].a==maxi.a) ^ aniversari.cpp:20:22: error: request for member 'l' in '((main()::persoana*)this)->main()::persoana::v[((main()::persoana*)this)->main()::persoana::i]', which is of non-class type 'int' if(v[i].l>maxi.l) ^ aniversari.cpp:20:29: error: request for member 'l' in '((main()::persoana*)this)->main()::persoana::maxi', which is of non-class type 'int' if(v[i].l>maxi.l) ^ aniversari.cpp:24:22: error: request for member 'l' in '((main()::persoana*)this)->main()::persoana::v[((main()::persoana*)this)->main()::persoana::i]', which is of non-class type 'int' if(v[i].l==maxi.l) ^ aniversari.cpp:24:30: error: request for member 'l' in '((main()::persoana*)this)->main()::persoana::maxi', which is of non-class type 'int' if(v[i].l==maxi.l) ^ aniversari.cpp:25:22: error: request for member 'z' in '((main()::persoana*)this)->main()::persoana::v[((main()::persoana*)this)->main()::persoana::i]', which is of non-class type 'int' if(v[i].z>maxi.z) ^ aniversari.cpp:25:29: error: request for member 'z' in '((main()::persoana*)this)->main()::persoana::maxi', which is of non-class type 'int' if(v[i].z>maxi.z) ^ aniversari.cpp:19:16: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(v[i].a==maxi.a) ^ aniversari.cpp:28:18: error: request for member 'a' in '((main()::persoana*)this)->main()::persoana::v[((main()::persoana*)this)->main()::persoana::i]', which is of non-class type 'int' if(v[i].a<mini.a) ^ aniversari.cpp:28:25: error: request for member 'a' in '((main()::persoana*)this)->main()::persoana::mini', which is of non-class type 'int' if(v[i].a<mini.a) ^ aniversari.cpp:32:22: error: request for member 'a' in '((main()::persoana*)this)->main()::persoana::v[((main()::persoana*)this)->main()::persoana::i]', which is of non-class type 'int' if(v[i].a==mini.a) ^ aniversari.cpp:32:30: error: request for member 'a' in '((main()::persoana*)this)->main()::persoana::mini', which is of non-class type 'int' if(v[i].a==mini.a) ^ aniversari.cpp:33:22: error: request for member 'l' in '((main()::persoana*)this)->main()::persoana::v[((main()::persoana*)this)->main()::persoana::i]', which is of non-class type 'int' if(v[i].l>mini.l) ^ aniversari.cpp:33:29: error: request for member 'l' in '((main()::persoana*)this)->main()::persoana::mini', which is of non-class type 'int' if(v[i].l>mini.l) ^ aniversari.cpp:37:22: error: request for member 'l' in '((main()::persoana*)this)->main()::persoana::v[((main()::persoana*)this)->main()::persoana::i]', which is of non-class type 'int' if(v[i].l==mini.l) ^ aniversari.cpp:37:30: error: request for member 'l' in '((main()::persoana*)this)->main()::persoana::mini', which is of non-class type 'int' if(v[i].l==mini.l) ^ aniversari.cpp:38:22: error: request for member 'z' in '((main()::persoana*)this)->main()::persoana::v[((main()::persoana*)this)->main()::persoana::i]', which is of non-class type 'int' if(v[i].z<mini.z) ^ aniversari.cpp:38:29: error: request for member 'z' in '((main()::persoana*)this)->main()::persoana::mini', which is of non-class type 'int' if(v[i].z<mini.z) ^ aniversari.cpp:32:16: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(v[i].a==mini.a) ^ aniversari.cpp: In function 'int main()': aniversari.cpp:45:1: error: expected unqualified-id at end of input } ^ aniversari.cpp:45:1: error: expected '}' at end of input
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Aniversari 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ă.