#454
Calendar
Se citesc 3
numere naturale z l a
. Să se decidă dacă reprezintă o dată calendaristică corectă, în format zi luna an
.
Problema | Calendar | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #38600657 | Utilizator | |
Fișier | calendar.cpp | Dimensiune | 594 B |
Data încărcării | 14 Octombrie 2022, 09:41 | Scor / rezultat | Eroare de compilare |
calendar.cpp:1:7: error: expected nested-name-specifier before 'System' using System; ^ calendar.cpp:1:7: error: 'System' has not been declared calendar.cpp:6:26: error: 'string' has not been declared static void Main(string[] args) ^ calendar.cpp:6:35: error: expected ',' or '...' before 'args' static void Main(string[] args) ^ calendar.cpp:24:5: error: expected ';' after class definition } ^ calendar.cpp: In static member function 'static void calendar::Program::Main(int*)': calendar.cpp:8:13: error: 'string' was not declared in this scope string[] S = Console.ReadLine().Split(); ^ calendar.cpp:8:20: error: expected primary-expression before ']' token string[] S = Console.ReadLine().Split(); ^ calendar.cpp:8:22: error: expected ';' before 'S' string[] S = Console.ReadLine().Split(); ^ calendar.cpp:9:22: error: expected primary-expression before 'int' int zi = int.Parse(S[0]); ^ calendar.cpp:10:24: error: expected primary-expression before 'int' int luna = int.Parse(S[1]); ^ calendar.cpp:11:22: error: expected primary-expression before 'int' int an = int.Parse(S[2]); ^ calendar.cpp:13:13: error: 'DateTime' was not declared in this scope DateTime d; ^ calendar.cpp:13:22: error: expected ';' before 'd' DateTime d; ^ calendar.cpp:16:17: error: 'd' was not declared in this scope d = DateTime.Parse(an + "-" + luna + "-" + zi); ^ calendar.cpp:16:54: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+' d = DateTime.Parse(an + "-" + luna + "-" + zi); ^ calendar.cpp:17:17: error: 'Console' was not declared in this scope Console.WriteLine("DA"); ^ calendar.cpp:19:19: error: expected type-specifier before 'Exception' catch(Exception ex) ^ calendar.cpp:19:29: error: expected ')' before 'ex' catch(Exception ex) ^ calendar.cpp:19:29: error: expected '{' before 'ex' calendar.cpp:19:29: error: 'ex' was not declared in this scope calendar.cpp:19:31: error: expected ';' before ')' token catch(Exception ex) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Calendar 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ă.