#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 | #52680691 | Utilizator | |
Fișier | aniversari.cpp | Dimensiune | 775 B |
Data încărcării | 07 Octombrie 2024, 00:53 | Scor / rezultat | Eroare de compilare |
aniversari.cpp: In function 'int main()': aniversari.cpp:18:19: error: request for member 'an' in 'p[i]', which is of non-class type 'int' cin>>p[i].an>>p[i].luna>>p[i].zi; ^ aniversari.cpp:18:28: error: request for member 'luna' in 'p[i]', which is of non-class type 'int' cin>>p[i].an>>p[i].luna>>p[i].zi; ^ aniversari.cpp:18:39: error: request for member 'zi' in 'p[i]', which is of non-class type 'int' cin>>p[i].an>>p[i].luna>>p[i].zi; ^ aniversari.cpp:19:14: error: request for member 'c' in 'p[i]', which is of non-class type 'int' p[i].c++; ^ aniversari.cpp:28:22: error: request for member 'an' in 'p[i]', which is of non-class type 'int' if((p[i].an>p[tc].an) || (p[i].an==p[tc].an) && (p[i].luna>p[tc].luna) || (p[i].luna==p[tc].luna) && (p[i].zi>p[tc].zi)) ^ aniversari.cpp:28:31: error: request for member 'an' in 'p[tc]', which is of non-class type 'int' if((p[i].an>p[tc].an) || (p[i].an==p[tc].an) && (p[i].luna>p[tc].luna) || (p[i].luna==p[tc].luna) && (p[i].zi>p[tc].zi)) ^ aniversari.cpp:28:44: error: request for member 'an' in 'p[i]', which is of non-class type 'int' if((p[i].an>p[tc].an) || (p[i].an==p[tc].an) && (p[i].luna>p[tc].luna) || (p[i].luna==p[tc].luna) && (p[i].zi>p[tc].zi)) ^ aniversari.cpp:28:54: error: request for member 'an' in 'p[tc]', which is of non-class type 'int' if((p[i].an>p[tc].an) || (p[i].an==p[tc].an) && (p[i].luna>p[tc].luna) || (p[i].luna==p[tc].luna) && (p[i].zi>p[tc].zi)) ^ aniversari.cpp:28:67: error: request for member 'luna' in 'p[i]', which is of non-class type 'int' if((p[i].an>p[tc].an) || (p[i].an==p[tc].an) && (p[i].luna>p[tc].luna) || (p[i].luna==p[tc].luna) && (p[i].zi>p[tc].zi)) ^ aniversari.cpp:28:78: error: request for member 'luna' in 'p[tc]', which is of non-class type 'int' if((p[i].an>p[tc].an) || (p[i].an==p[tc].an) && (p[i].luna>p[tc].luna) || (p[i].luna==p[tc].luna) && (p[i].zi>p[tc].zi)) ^ aniversari.cpp:28:93: error: request for member 'luna' in 'p[i]', which is of non-class type 'int' if((p[i].an>p[tc].an) || (p[i].an==p[tc].an) && (p[i].luna>p[tc].luna) || (p[i].luna==p[tc].luna) && (p[i].zi>p[tc].zi)) ^ aniversari.cpp:28:105: error: request for member 'luna' in 'p[tc]', which is of non-class type 'int' if((p[i].an>p[tc].an) || (p[i].an==p[tc].an) && (p[i].luna>p[tc].luna) || (p[i].luna==p[tc].luna) && (p[i].zi>p[tc].zi)) ^ aniversari.cpp:28:120: error: request for member 'zi' in 'p[i]', which is of non-class type 'int' if((p[i].an>p[tc].an) || (p[i].an==p[tc].an) && (p[i].luna>p[tc].luna) || (p[i].luna==p[tc].luna) && (p[i].zi>p[tc].zi)) ^ aniversari.cpp:28:129: error: request for member 'zi' in 'p[tc]', which is of non-class type 'int' if((p[i].an>p[tc].an) || (p[i].an==p[tc].an) && (p[i].luna>p[tc].luna) || (p[i].luna==p[tc].luna) && (p[i].zi>p[tc].zi)) ^ aniversari.cpp:32:22: error: request for member 'an' in 'p[i]', which is of non-class type 'int' if((p[i].an<p[bc].an) && (p[i].luna<p[bc].luna) || (p[i].luna==p[bc].luna) && (p[i].zi<p[tc].zi)) ^ aniversari.cpp:32:31: error: request for member 'an' in 'p[bc]', which is of non-class type 'int' if((p[i].an<p[bc].an) && (p[i].luna<p[bc].luna) || (p[i].luna==p[bc].luna) && (p[i].zi<p[tc].zi)) ^ aniversari.cpp:32:44: error: request for member 'luna' in 'p[i]', which is of non-class type 'int' if((p[i].an<p[bc].an) && (p[i].luna<p[bc].luna) || (p[i].luna==p[bc].luna) && (p[i].zi<p[tc].zi)) ^ aniversari.cpp:32:55: error: request for member 'luna' in 'p[bc]', which is of non-class type 'int' if((p[i].an<p[bc].an) && (p[i].luna<p[bc].luna) || (p[i].luna==p[bc].luna) && (p[i].zi<p[tc].zi)) ^ aniversari.cpp:32:70: error: request for member 'luna' in 'p[i]', which is of non-class type 'int' if((p[i].an<p[bc].an) && (p[i].luna<p[bc].luna) || (p[i].luna==p[bc].luna) && (p[i].zi<p[tc].zi)) ^ aniversari.cpp:32:82: error: request for member 'luna' in 'p[bc]', which is of non-class type 'int' if((p[i].an<p[bc].an) && (p[i].luna<p[bc].luna) || (p[i].luna==p[bc].luna) && (p[i].zi<p[tc].zi)) ^ aniversari.cpp:32:97: error: request for member 'zi' in 'p[i]', which is of non-class type 'int' if((p[i].an<p[bc].an) && (p[i].luna<p[bc].luna) || (p[i].luna==p[bc].luna) && (p[i].zi<p[tc].zi)) ^ aniversari.cpp:32:106: error: request for member 'zi' in 'p[tc]', which is of non-class type 'int' if((p[i].an<p[bc].an) && (p[i].luna<p[bc].luna) || (p[i].luna==p[bc].luna) && (p[i].zi<p[tc].zi)) ^
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ă.