17 lines
544 B
Ada
17 lines
544 B
Ada
package ComplexCalculator is
|
|
-- holds the records and fields for the numbers
|
|
type ComplexNumber is record
|
|
|
|
Real : Float;
|
|
Imaginary : Float;
|
|
|
|
end record;
|
|
|
|
-- Defines the functions for calculations.
|
|
function Add(First, Second : ComplexNumber) return ComplexNumber;
|
|
function Sub(First, Second : ComplexNumber) return ComplexNumber;
|
|
function Multiply(First, Second : ComplexNumber) return ComplexNumber;
|
|
function Divide(First, Second : ComplexNumber) return ComplexNumber;
|
|
|
|
end ComplexCalculator;
|