#941
Urare
În preajma Crăciunului toţi suntem sau redevenim copii.
Scrie un program care afişează pe ecran o urare pentru cei dragi ţie!
Problema | Urare | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #24525255 | Utilizator | |
Fișier | urare.cpp | Dimensiune | 2.67 KB |
Data încărcării | 12 Octombrie 2020, 13:28 | Scor / rezultat | Eroare de compilare |
urare.cpp:1:7: error: expected nested-name-specifier before 'System' using System; ^ urare.cpp:1:7: error: 'System' has not been declared urare.cpp:8:18: error: expected ':' before 'int' { public int nr, nu;}; ^ urare.cpp:14:35: error: 'ref' has not been declared static void simplificare (ref fractie f) ^ urare.cpp:14:47: error: expected ',' or '...' before 'f' static void simplificare (ref fractie f) ^ urare.cpp:21:26: error: 'string' has not been declared static void Main(string[] args) ^ urare.cpp:21:35: error: expected ',' or '...' before 'args' static void Main(string[] args) ^ urare.cpp:33:5: error: expected ';' after class definition } ^ urare.cpp: In static member function 'static void structINTREBAREstruct::Program::simplificare(int)': urare.cpp:16:27: error: 'f' was not declared in this scope int c = cmmdc(f.nu, f.nr); ^ urare.cpp: In static member function 'static void structINTREBAREstruct::Program::Main(int*)': urare.cpp:24:15: error: no match for 'operator=' (operand types are 'structINTREBAREstruct::Program::fractie' and 'structINTREBAREstruct::Program::fractie*') f = new fractie(); // trebuie creata ^ urare.cpp:24:15: note: candidates are: urare.cpp:7:16: note: structINTREBAREstruct::Program::fractie& structINTREBAREstruct::Program::fractie::operator=(const structINTREBAREstruct::Program::fractie&) struct fractie ^ urare.cpp:7:16: note: no known conversion for argument 1 from 'structINTREBAREstruct::Program::fractie*' to 'const structINTREBAREstruct::Program::fractie&' urare.cpp:7:16: note: structINTREBAREstruct::Program::fractie& structINTREBAREstruct::Program::fractie::operator=(structINTREBAREstruct::Program::fractie&&) urare.cpp:7:16: note: no known conversion for argument 1 from 'structINTREBAREstruct::Program::fractie*' to 'structINTREBAREstruct::Program::fractie&&' urare.cpp:25:20: error: expected primary-expression before 'int' f.nr = int.Parse(Console.ReadLine()); ^ urare.cpp:25:20: error: expected ';' before 'int' urare.cpp:26:20: error: expected primary-expression before 'int' f.nu = int.Parse(Console.ReadLine()); ^ urare.cpp:26:20: error: expected ';' before 'int' urare.cpp:27:26: error: 'ref' was not declared in this scope simplificare(ref f); ^ urare.cpp:28:13: error: 'Console' was not declared in this scope Console.WriteLine(f.nr + "/" + f.nu); ^ urare.cpp: At global scope: urare.cpp:37:1: error: expected unqualified-id before '--' token ---------------------------------------------------------- ^ urare.cpp:46:11: error: redefinition of 'class structINTREBAREstruct::Program' class Program ^ urare.cpp:5:11: error: previous definition of 'class structINTREBAREstruct::Program' class Program ^ urare.cpp:104:1: error: expected unqualified-id before '}' token } ^ urare.cpp:107:1: error: expected unqualified-id before '--' token ------------------------------------------------------- ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Urare 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ă.