#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 | #52657141 | Utilizator | |
Fișier | aniversari.cpp | Dimensiune | 749 B |
Data încărcării | 06 Octombrie 2024, 12:02 | Scor / rezultat | Eroare de compilare |
aniversari.cpp: In function 'int main()': aniversari.cpp:14:13: error: request for member 'x' in 'an', which is of non-class type 'int' cin>>an.x>>an.y; ^ aniversari.cpp:14:19: error: request for member 'y' in 'an', which is of non-class type 'int' cin>>an.x>>an.y; ^ aniversari.cpp:15:11: error: request for member 'x' in 'luna', which is of non-class type 'int' cin>>luna.x>>luna.y: ^ aniversari.cpp:15:20: error: found ':' in nested-name-specifier, expected '::' cin>>luna.x>>luna.y: ^ aniversari.cpp:15:19: error: request for member 'y' in non-class type 'int' cin>>luna.x>>luna.y: ^ aniversari.cpp:16:16: error: request for member 'x' in 'zi', which is of non-class type 'int' cin>>zi.x>>zi.y; ^ aniversari.cpp:16:22: error: request for member 'y' in 'zi', which is of non-class type 'int' cin>>zi.x>>zi.y; ^ aniversari.cpp:17:17: error: 'n' was not declared in this scope for (i=0; i<n; i++) ^ aniversari.cpp:23:24: error: request for member 'x' in 'an', which is of non-class type 'int' if (an.x>an.y) ^ aniversari.cpp:23:29: error: request for member 'y' in 'an', which is of non-class type 'int' if (an.x>an.y) ^ aniversari.cpp:25:29: error: request for member 'x' in 'an', which is of non-class type 'int' dmax=an.x; ^ aniversari.cpp:26:29: error: request for member 'y' in 'an', which is of non-class type 'int' dmin=an.y; ^ aniversari.cpp:28:26: error: request for member 'x' in 'an', which is of non-class type 'int' else (an.x<an.y) ^ aniversari.cpp:28:31: error: request for member 'y' in 'an', which is of non-class type 'int' else (an.x<an.y) ^ aniversari.cpp:29:17: error: expected ';' before '{' token { ^ aniversari.cpp:36:5: error: 'p' was not declared in this scope p=dmax; ^ aniversari.cpp:37:5: error: 'q' was not declared in this scope q=dmin; ^ aniversari.cpp:13:9: warning: unused variable 'a' [-Wunused-variable] int a[100],i,j,k,dmin=0,dmax=0; ^
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ă.