#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 | #42487242 | Utilizator | |
Fișier | aniversari.cpp | Dimensiune | 690 B |
Data încărcării | 07 Martie 2023, 20:09 | Scor / rezultat | Eroare de compilare |
aniversari.cpp:1:10: error: #include expects "FILENAME" or <FILENAME> #include <iostream> ^ aniversari.cpp:2:10: error: #include expects "FILENAME" or <FILENAME> #include <fstream> ^ aniversari.cpp: In function 'bool comparare(data, data)': aniversari.cpp:11:8: error: 'gt' was not declared in this scope if(x.a>y.a)return true; ^ aniversari.cpp:11:10: error: expected ')' before ';' token if(x.a>y.a)return true; ^ aniversari.cpp:11:14: error: expected ';' before ')' token if(x.a>y.a)return true; ^ aniversari.cpp:11:26: warning: statement has no effect [-Wunused-value] if(x.a>y.a)return true; ^ aniversari.cpp:12:21: error: 'gt' was not declared in this scope if(x.a==y.a and x.l>y.l)return true; ^ aniversari.cpp:12:23: error: expected ')' before ';' token if(x.a==y.a and x.l>y.l)return true; ^ aniversari.cpp:12:27: error: expected ';' before ')' token if(x.a==y.a and x.l>y.l)return true; ^ aniversari.cpp:12:39: warning: statement has no effect [-Wunused-value] if(x.a==y.a and x.l>y.l)return true; ^ aniversari.cpp:14:34: error: 'gt' was not declared in this scope if(x.a==y.a and x.l==y.l and x.z>y.z)return true; ^ aniversari.cpp:14:36: error: expected ')' before ';' token if(x.a==y.a and x.l==y.l and x.z>y.z)return true; ^ aniversari.cpp:14:40: error: expected ';' before ')' token if(x.a==y.a and x.l==y.l and x.z>y.z)return true; ^ aniversari.cpp:14:52: warning: statement has no effect [-Wunused-value] if(x.a==y.a and x.l==y.l and x.z>y.z)return true; ^ aniversari.cpp: In function 'int main()': aniversari.cpp:3:12: error: 'cin' was not declared in this scope #define fi cin ^ aniversari.cpp:18:1: note: in expansion of macro 'fi' fi>>n; ^ aniversari.cpp:18:4: error: 'gt' was not declared in this scope fi>>n; ^ aniversari.cpp:18:12: warning: statement has no effect [-Wunused-value] fi>>n; ^ aniversari.cpp:19:11: error: 'lt' was not declared in this scope for(i=1;i<=n;i++) ^ aniversari.cpp:19:14: error: expected primary-expression before '=' token for(i=1;i<=n;i++) ^ aniversari.cpp:19:16: error: expected ')' before ';' token for(i=1;i<=n;i++) ^ aniversari.cpp:19:20: error: expected ';' before ')' token for(i=1;i<=n;i++) ^ aniversari.cpp:20:45: warning: statement has no effect [-Wunused-value] fi>>y[i].a>>y[i].l>>y[i].z; ^ aniversari.cpp:22:11: error: 'lt' was not declared in this scope for(i=1;i<=n;i++){ ^ aniversari.cpp:22:14: error: expected primary-expression before '=' token for(i=1;i<=n;i++){ ^ aniversari.cpp:22:16: error: expected ')' before ';' token for(i=1;i<=n;i++){ ^ aniversari.cpp:22:20: error: expected ';' before ')' token for(i=1;i<=n;i++){ ^ aniversari.cpp:28: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ă.