#3539
oop_numere_complexe
C++
Ai primit definiția unei clase. Implementează toate metodele clasei.
Problema | oop_numere_complexe | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53320720 | Utilizator | |
Fișier | oop_numere_complexe.cpp | Dimensiune | 1.59 KB |
Data încărcării | 24 Octombrie 2024, 11:59 | Scor / rezultat | Eroare de compilare |
oop_numere_complexe.cpp:31:7: error: expected nested-name-specifier before 'System' using System; ^ oop_numere_complexe.cpp:31:7: error: 'System' has not been declared oop_numere_complexe.cpp:32:7: error: expected nested-name-specifier before 'System' using System.Collections.Generic; ^ oop_numere_complexe.cpp:32:7: error: 'System' has not been declared oop_numere_complexe.cpp:32:13: error: expected ';' before '.' token using System.Collections.Generic; ^ oop_numere_complexe.cpp:32:13: error: expected unqualified-id before '.' token oop_numere_complexe.cpp:33:7: error: expected nested-name-specifier before 'System' using System.Linq; ^ oop_numere_complexe.cpp:33:7: error: 'System' has not been declared oop_numere_complexe.cpp:33:13: error: expected ';' before '.' token using System.Linq; ^ oop_numere_complexe.cpp:33:13: error: expected unqualified-id before '.' token oop_numere_complexe.cpp:34:7: error: expected nested-name-specifier before 'System' using System.Text; ^ oop_numere_complexe.cpp:34:7: error: 'System' has not been declared oop_numere_complexe.cpp:34:13: error: expected ';' before '.' token using System.Text; ^ oop_numere_complexe.cpp:34:13: error: expected unqualified-id before '.' token oop_numere_complexe.cpp:35:7: error: expected nested-name-specifier before 'System' using System.Threading.Tasks; ^ oop_numere_complexe.cpp:35:7: error: 'System' has not been declared oop_numere_complexe.cpp:35:13: error: expected ';' before '.' token using System.Threading.Tasks; ^ oop_numere_complexe.cpp:35:13: error: expected unqualified-id before '.' token oop_numere_complexe.cpp:42:16: error: expected ':' before 'complex' public complex(int pr, int pi) ^ oop_numere_complexe.cpp:47:16: error: expected ':' before 'complex' public complex() ^ oop_numere_complexe.cpp:52:16: error: expected ':' before 'int' public int Real ^ oop_numere_complexe.cpp:56:9: error: expected ';' at end of member declaration } ^ oop_numere_complexe.cpp:57:16: error: expected ':' before 'int' public int imagi ^ oop_numere_complexe.cpp:64:9: error: expected ';' at end of member declaration } ^ oop_numere_complexe.cpp:66:16: error: expected ':' before 'double' public double modul() ^ oop_numere_complexe.cpp:76:16: error: expected ':' before 'int' public int real() ^ oop_numere_complexe.cpp:81:16: error: expected ':' before 'int' public int imag() ^ oop_numere_complexe.cpp:85:16: error: expected ':' before 'static' public static complex operator+(complex a,complex b) ^ oop_numere_complexe.cpp:85:60: error: 'static ConsoleApp1::complex ConsoleApp1::complex::operator+(ConsoleApp1::complex, ConsoleApp1::complex)' must be either a non-static member function or a non-member function public static complex operator+(complex a,complex b) ^ oop_numere_complexe.cpp:89:16: error: expected ':' before 'static' public static complex operator -(complex a,complex b) ^ oop_numere_complexe.cpp:89:61: error: 'static ConsoleApp1::complex ConsoleApp1::complex::operator-(ConsoleApp1::complex, ConsoleApp1::complex)' must be either a non-static member function or a non-member function public static complex operator -(complex a,complex b) ^ oop_numere_complexe.cpp:93:16: error: expected ':' before 'static' public static complex operator *(complex a, complex b) ^ oop_numere_complexe.cpp:93:62: error: 'static ConsoleApp1::complex ConsoleApp1::complex::operator*(ConsoleApp1::complex, ConsoleApp1::complex)' must be either a non-static member function or a non-member function public static complex operator *(complex a, complex b) ^ oop_numere_complexe.cpp:99:5: error: expected ';' after class definition } ^ oop_numere_complexe.cpp:54:13: error: 'get' was not declared in this scope get { return r; } ^ oop_numere_complexe.cpp:54:17: error: expected '}' before '{' token get { return r; } ^ oop_numere_complexe.cpp:54:17: error: cannot convert '<brace-enclosed initializer list>' to 'int' in initialization oop_numere_complexe.cpp:54:17: error: expected ';' before '{' token oop_numere_complexe.cpp:59:13: error: 'get' was not declared in this scope get { return i; } ^ oop_numere_complexe.cpp:59:17: error: expected '}' before '{' token get { return i; } ^ oop_numere_complexe.cpp:59:17: error: cannot convert '<brace-enclosed initializer list>' to 'int' in initialization oop_numere_complexe.cpp:59:17: error: expected ';' before '{' token oop_numere_complexe.cpp: In member function 'double ConsoleApp1::complex::modul()': oop_numere_complexe.cpp:68:25: error: 'Math' was not declared in this scope double nr = Math.Pow(r,2); ^ oop_numere_complexe.cpp: At global scope: oop_numere_complexe.cpp:102:35: error: expected ',' or '...' before 'args' static void Main(string[] args) ^ oop_numere_complexe.cpp:105:5: error: expected ';' after class definition } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema oop_numere_complexe face parte din a doua categorie. Pentru aceste probleme se folosește un program suport, furnizat de propunătorul problemei. 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ă.