#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 | #54810534 | Utilizator | |
Fișier | aniversari.cpp | Dimensiune | 640 B |
Data încărcării | 09 Decembrie 2024, 12:48 | Scor / rezultat | Eroare de compilare |
aniversari.cpp:8:1: error: expected ';' after struct definition }int v[1001]; ^ aniversari.cpp: In function 'int main()': aniversari.cpp:14:15: error: request for member 'an' in 'v[1]', which is of non-class type 'int' cin>>v[1].an>>v[1].luna>>v[1].zi; ^ aniversari.cpp:14:24: error: request for member 'luna' in 'v[1]', which is of non-class type 'int' cin>>v[1].an>>v[1].luna>>v[1].zi; ^ aniversari.cpp:14:35: error: request for member 'zi' in 'v[1]', which is of non-class type 'int' cin>>v[1].an>>v[1].luna>>v[1].zi; ^ aniversari.cpp:17:19: error: request for member 'an' in 'v[i]', which is of non-class type 'int' cin>>v[i].an>>v[i].luna>>v[i].zi; ^ aniversari.cpp:17:28: error: request for member 'luna' in 'v[i]', which is of non-class type 'int' cin>>v[i].an>>v[i].luna>>v[i].zi; ^ aniversari.cpp:17:39: error: request for member 'zi' in 'v[i]', which is of non-class type 'int' cin>>v[i].an>>v[i].luna>>v[i].zi; ^ aniversari.cpp:18:17: error: request for member 'an' in 'v[i]', which is of non-class type 'int' if(v[i].an>v[t].an||v[i].an==v[t].an&& v[i].luna>v[t].luna||v[i].an==v[t].an&& v[i].luna==v[t].luna&&v[i].zi>v[t].zi) ^ aniversari.cpp:18:25: error: request for member 'an' in 'v[t]', which is of non-class type 'int' if(v[i].an>v[t].an||v[i].an==v[t].an&& v[i].luna>v[t].luna||v[i].an==v[t].an&& v[i].luna==v[t].luna&&v[i].zi>v[t].zi) ^ aniversari.cpp:18:34: error: request for member 'an' in 'v[i]', which is of non-class type 'int' if(v[i].an>v[t].an||v[i].an==v[t].an&& v[i].luna>v[t].luna||v[i].an==v[t].an&& v[i].luna==v[t].luna&&v[i].zi>v[t].zi) ^ aniversari.cpp:18:43: error: request for member 'an' in 'v[t]', which is of non-class type 'int' if(v[i].an>v[t].an||v[i].an==v[t].an&& v[i].luna>v[t].luna||v[i].an==v[t].an&& v[i].luna==v[t].luna&&v[i].zi>v[t].zi) ^ aniversari.cpp:18:53: error: request for member 'luna' in 'v[i]', which is of non-class type 'int' if(v[i].an>v[t].an||v[i].an==v[t].an&& v[i].luna>v[t].luna||v[i].an==v[t].an&& v[i].luna==v[t].luna&&v[i].zi>v[t].zi) ^ aniversari.cpp:18:63: error: request for member 'luna' in 'v[t]', which is of non-class type 'int' if(v[i].an>v[t].an||v[i].an==v[t].an&& v[i].luna>v[t].luna||v[i].an==v[t].an&& v[i].luna==v[t].luna&&v[i].zi>v[t].zi) ^ aniversari.cpp:18:74: error: request for member 'an' in 'v[i]', which is of non-class type 'int' if(v[i].an>v[t].an||v[i].an==v[t].an&& v[i].luna>v[t].luna||v[i].an==v[t].an&& v[i].luna==v[t].luna&&v[i].zi>v[t].zi) ^ aniversari.cpp:18:83: error: request for member 'an' in 'v[t]', which is of non-class type 'int' if(v[i].an>v[t].an||v[i].an==v[t].an&& v[i].luna>v[t].luna||v[i].an==v[t].an&& v[i].luna==v[t].luna&&v[i].zi>v[t].zi) ^ aniversari.cpp:18:93: error: request for member 'luna' in 'v[i]', which is of non-class type 'int' if(v[i].an>v[t].an||v[i].an==v[t].an&& v[i].luna>v[t].luna||v[i].an==v[t].an&& v[i].luna==v[t].luna&&v[i].zi>v[t].zi) ^ aniversari.cpp:18:104: error: request for member 'luna' in 'v[t]', which is of non-class type 'int' if(v[i].an>v[t].an||v[i].an==v[t].an&& v[i].luna>v[t].luna||v[i].an==v[t].an&& v[i].luna==v[t].luna&&v[i].zi>v[t].zi) ^ aniversari.cpp:18:115: error: request for member 'zi' in 'v[i]', which is of non-class type 'int' if(v[i].an>v[t].an||v[i].an==v[t].an&& v[i].luna>v[t].luna||v[i].an==v[t].an&& v[i].luna==v[t].luna&&v[i].zi>v[t].zi) ^ aniversari.cpp:18:123: error: request for member 'zi' in 'v[t]', which is of non-class type 'int' if(v[i].an>v[t].an||v[i].an==v[t].an&& v[i].luna>v[t].luna||v[i].an==v[t].an&& v[i].luna==v[t].luna&&v[i].zi>v[t].zi) ^ aniversari.cpp:20:17: error: request for member 'an' in 'v[i]', which is of non-class type 'int' if(v[i].an<v[b].an||v[i].an==v[b].an&& v[i].luna<v[b].luna||v[i].an==v[b].an&& v[i].luna==v[b].luna&&v[i].zi<v[b].zi) ^ aniversari.cpp:20:25: error: request for member 'an' in 'v[b]', which is of non-class type 'int' if(v[i].an<v[b].an||v[i].an==v[b].an&& v[i].luna<v[b].luna||v[i].an==v[b].an&& v[i].luna==v[b].luna&&v[i].zi<v[b].zi) ^ aniversari.cpp:20:34: error: request for member 'an' in 'v[i]', which is of non-class type 'int' if(v[i].an<v[b].an||v[i].an==v[b].an&& v[i].luna<v[b].luna||v[i].an==v[b].an&& v[i].luna==v[b].luna&&v[i].zi<v[b].zi) ^ aniversari.cpp:20:43: error: request for member 'an' in 'v[b]', which is of non-class type 'int' if(v[i].an<v[b].an||v[i].an==v[b].an&& v[i].luna<v[b].luna||v[i].an==v[b].an&& v[i].luna==v[b].luna&&v[i].zi<v[b].zi) ^ aniversari.cpp:20:53: error: request for member 'luna' in 'v[i]', which is of non-class type 'int' if(v[i].an<v[b].an||v[i].an==v[b].an&& v[i].luna<v[b].luna||v[i].an==v[b].an&& v[i].luna==v[b].luna&&v[i].zi<v[b].zi) ^ aniversari.cpp:20:63: error: request for member 'luna' in 'v[b]', which is of non-class type 'int' if(v[i].an<v[b].an||v[i].an==v[b].an&& v[i].luna<v[b].luna||v[i].an==v[b].an&& v[i].luna==v[b].luna&&v[i].zi<v[b].zi) ^ aniversari.cpp:20:74: error: request for member 'an' in 'v[i]', which is of non-class type 'int' if(v[i].an<v[b].an||v[i].an==v[b].an&& v[i].luna<v[b].luna||v[i].an==v[b].an&& v[i].luna==v[b].luna&&v[i].zi<v[b].zi) ^ aniversari.cpp:20:83: error: request for member 'an' in 'v[b]', which is of non-class type 'int' if(v[i].an<v[b].an||v[i].an==v[b].an&& v[i].luna<v[b].luna||v[i].an==v[b].an&& v[i].luna==v[b].luna&&v[i].zi<v[b].zi) ^ aniversari.cpp:20:93: error: request for member 'luna' in 'v[i]', which is of non-class type 'int' if(v[i].an<v[b].an||v[i].an==v[b].an&& v[i].luna<v[b].luna||v[i].an==v[b].an&& v[i].luna==v[b].luna&&v[i].zi<v[b].zi) ^ aniversari.cpp:20:104: error: request for member 'luna' in 'v[b]', which is of non-class type 'int' if(v[i].an<v[b].an||v[i].an==v[b].an&& v[i].luna<v[b].luna||v[i].an==v[b].an&& v[i].luna==v[b].luna&&v[i].zi<v[b].zi) ^ aniversari.cpp:20:115: error: request for member 'zi' in 'v[i]', which is of non-class type 'int' if(v[i].an<v[b].an||v[i].an==v[b].an&& v[i].luna<v[b].luna||v[i].an==v[b].an&& v[i].luna==v[b].luna&&v[i].zi<v[b].zi) ^ aniversari.cpp:20:123: error: request for member 'zi' in 'v[b]', which is of non-class type 'int' if(v[i].an<v[b].an||v[i].an==v[b].an&& v[i].luna<v[b].luna||v[i].an==v[b].an&& v[i].luna==v[b].luna&&v[i].zi<v[b].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ă.