program ComplexArithmetic (I Iltput); Program 7.1 - Illustrate ,'::Jmplex numbers operations.} const Increment 4; type Complex record var Re, 1m: Real end; X, Y: Complex; Pair: Integer; begin X.Re := 2; X.Im:= 5; Y := X; for Pair := 1 to Writeln(Output, Writeln(Output, 5 do 'X 'Y = {X + Y} Writeln(Output, 'Sum beg , , initialize X initialize Y n X.Re : 5: 1, X.Im 'f.Re : 5: 1, Y.Im : 5: 1, : 5: 1, X.Re + Y.Re :5:1, X.Im + Y. III : 5 : 1, 'i'); {X * Y} Writeln(Output, 'Produc' X.Re * Y.le - X.Im*Y.Im :5:1, ' i' ) ; ' i' ) ; X. Re * Y. 'fl + X. 1m * Y. Re : 5: 1, 'i'); Writeln(Output); X.Re X.Re + Increment X.Im .- X.Im - Increment end end . 

## Produces as results: 

X = 2.0 5.0i Y = 2.0 5.0i Sum 4.0 10.0i Product = -21.0 20.0i X = 6.0 1.0i Y = 2.0 5.0i Sum 8.0 6.0i Product = 7.0 32.0i 

