Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
27
Task/Arithmetic-Complex/Delphi/arithmetic-complex.delphi
Normal file
27
Task/Arithmetic-Complex/Delphi/arithmetic-complex.delphi
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
program Arithmetic_Complex;
|
||||
|
||||
{$APPTYPE CONSOLE}
|
||||
|
||||
uses
|
||||
System.SysUtils,
|
||||
System.VarCmplx;
|
||||
|
||||
var
|
||||
a, b: Variant;
|
||||
|
||||
begin
|
||||
a := VarComplexCreate(5, 3);
|
||||
b := VarComplexCreate(0.5, 6.0);
|
||||
|
||||
writeln(format('(%s) + (%s) = %s',[a,b, a+b]));
|
||||
|
||||
writeln(format('(%s) * (%s) = %s',[a,b, a*b]));
|
||||
|
||||
writeln(format('-(%s) = %s',[a,- a]));
|
||||
|
||||
writeln(format('1/(%s) = %s',[a,1/a]));
|
||||
|
||||
writeln(format('conj(%s) = %s',[a,VarComplexConjugate(a)]));
|
||||
|
||||
Readln;
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue