#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 | #54202561 | Utilizator | |
Fișier | aniversari.cpp | Dimensiune | 2.46 KB |
Data încărcării | 22 Noiembrie 2024, 08:13 | Scor / rezultat | Eroare de compilare |
aniversari.cpp:1:7: error: expected nested-name-specifier before 'System' using System; ^ aniversari.cpp:1:7: error: 'System' has not been declared aniversari.cpp:2:7: error: expected nested-name-specifier before 'System' using System.Collections.Generic; ^ aniversari.cpp:2:7: error: 'System' has not been declared aniversari.cpp:2:13: error: expected ';' before '.' token using System.Collections.Generic; ^ aniversari.cpp:2:13: error: expected unqualified-id before '.' token aniversari.cpp:3:7: error: expected nested-name-specifier before 'System' using System.Linq; ^ aniversari.cpp:3:7: error: 'System' has not been declared aniversari.cpp:3:13: error: expected ';' before '.' token using System.Linq; ^ aniversari.cpp:3:13: error: expected unqualified-id before '.' token aniversari.cpp:4:7: error: expected nested-name-specifier before 'System' using System.Text; ^ aniversari.cpp:4:7: error: 'System' has not been declared aniversari.cpp:4:13: error: expected ';' before '.' token using System.Text; ^ aniversari.cpp:4:13: error: expected unqualified-id before '.' token aniversari.cpp:5:7: error: expected nested-name-specifier before 'System' using System.Threading.Tasks; ^ aniversari.cpp:5:7: error: 'System' has not been declared aniversari.cpp:5:13: error: expected ';' before '.' token using System.Threading.Tasks; ^ aniversari.cpp:5:13: error: expected unqualified-id before '.' token aniversari.cpp:9:11: error: expected nested-name-specifier before 'System' using System; ^ aniversari.cpp:9:11: error: 'System' has not been declared aniversari.cpp:10:11: error: expected nested-name-specifier before 'System' using System.IO; ^ aniversari.cpp:10:11: error: 'System' has not been declared aniversari.cpp:10:17: error: expected ';' before '.' token using System.IO; ^ aniversari.cpp:10:17: error: expected unqualified-id before '.' token aniversari.cpp:11:11: error: expected nested-name-specifier before 'System' using System.Linq; ^ aniversari.cpp:11:11: error: 'System' has not been declared aniversari.cpp:11:17: error: expected ';' before '.' token using System.Linq; ^ aniversari.cpp:11:17: error: expected unqualified-id before '.' token aniversari.cpp:17:21: error: expected ':' before 'int' private int id, year, month, day; ^ aniversari.cpp:18:20: error: expected ':' before 'Person' public Person() { } ^ aniversari.cpp:19:20: error: expected ':' before 'Person' public Person(int id, int year, int month, int day) ^ aniversari.cpp:26:20: error: expected ':' before 'int' public int _id { get { return id; } set { id = value; } } ^ aniversari.cpp:26:69: error: expected ';' at end of member declaration public int _id { get { return id; } set { id = value; } } ^ aniversari.cpp:27:20: error: expected ':' before 'int' public int _year { get { return year; } set { year = value; } } ^ aniversari.cpp:27:75: error: expected ';' at end of member declaration public int _year { get { return year; } set { year = value; } } ^ aniversari.cpp:28:20: error: expected ':' before 'int' public int _month { get { return month; } set { month = value; } } ^ aniversari.cpp:28:78: error: expected ';' at end of member declaration public int _month { get { return month; } set { month = value; } } ^ aniversari.cpp:29:20: error: expected ':' before 'int' public int _day { get { return day; } set { day = value; } } ^ aniversari.cpp:29:72: error: expected ';' at end of member declaration public int _day { get { return day; } set { day = value; } } ^ aniversari.cpp:31:20: error: expected ':' before 'static' public static bool operator <(Person a, Person b) ^ aniversari.cpp:31:61: error: 'static bool Aniversari::UnBobbyBrown::Person::operator<(Aniversari::UnBobbyBrown::Person, Aniversari::UnBobbyBrown::Person)' must be either a non-static member function or a non-member function public static bool operator <(Person a, Person b) ^ aniversari.cpp:38:20: error: expected ':' before 'static' public static bool operator >(Person a, Person b) ^ aniversari.cpp:38:61: error: 'static bool Aniversari::UnBobbyBrown::Person::operator>(Aniversari::UnBobbyBrown::Person, Aniversari::UnBobbyBrown::Person)' must be either a non-static member function or a non-member function public static bool operator >(Person a, Person b) ^ aniversari.cpp:26:30: error: 'get' was not declared in this scope public int _id { get { return id; } set { id = value; } } ^ aniversari.cpp:26:34: error: expected '}' before '{' token public int _id { get { return id; } set { id = value; } } ^ aniversari.cpp:26:34: error: cannot convert '<brace-enclosed initializer list>' to 'int' in initialization aniversari.cpp:26:34: error: expected ';' before '{' token aniversari.cpp:27:32: error: 'get' was not declared in this scope public int _year { get { return year; } set { year = value; } } ^ aniversari.cpp:27:36: error: expected '}' before '{' token public int _year { get { return year; } set { year = value; } } ^ aniversari.cpp:27:36: error: cannot convert '<brace-enclosed initializer list>' to 'int' in initialization aniversari.cpp:27:36: error: expected ';' before '{' token aniversari.cpp:28:33: error: 'get' was not declared in this scope public int _month { get { return month; } set { month = value; } } ^ aniversari.cpp:28:37: error: expected '}' before '{' token public int _month { get { return month; } set { month = value; } } ^ aniversari.cpp:28:37: error: cannot convert '<brace-enclosed initializer list>' to 'int' in initialization aniversari.cpp:28:37: error: expected ';' before '{' token aniversari.cpp:29:31: error: 'get' was not declared in this scope public int _day { get { return day; } set { day = value; } } ^ aniversari.cpp:29:35: error: expected '}' before '{' token public int _day { get { return day; } set { day = value; } } ^ aniversari.cpp:29:35: error: cannot convert '<brace-enclosed initializer list>' to 'int' in initialization aniversari.cpp:29:35: error: expected ';' before '{' token aniversari.cpp: In constructor 'Aniversari::UnBobbyBrown::Person::Person(int, int, int, int)': aniversari.cpp:21:22: error: request for member 'id' in 'this', which is of pointer type 'Aniversari::UnBobbyBrown::Person* const' (maybe you meant to use '->' ?) this.id = id; ^ aniversari.cpp:22:22: error: request for member 'year' in 'this', which is of pointer type 'Aniversari::UnBobbyBrown::Person* const' (maybe you meant to use '->' ?) this.year = year; ^ aniversari.cpp:23:22: error: request for member 'month' in 'this', which is of pointer type 'Aniversari::UnBobbyBrown::Person* const' (maybe you meant to use '->' ?) this.month = month; ^ aniversari.cpp:24:22: error: request for member 'day' in 'this', which is of pointer type 'Aniversari::UnBobbyBrown::Person* const' (maybe you meant to use '->' ?) this.day = day; ^ aniversari.cpp: At global scope: aniversari.cpp:48:18: error: expected initializer before 'class' internal class Program ^ aniversari.cpp:78:1: error: expected '}' at end of input } ^ aniversari.cpp:78: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ă.