This repository has been archived on 2024-01-18. You can view files and clone it, but cannot push or open issues or pull requests.
Turner-CS4308-Homework_4/main.adb

31 lines
967 B
Ada
Raw Normal View History

2023-10-25 14:04:40 +00:00
with ComplexCalculator;
with Ada.Text_IO;
2023-10-25 15:28:39 +00:00
procedure Main is
FirstInput : String(1..10);
SecondInput : String(1..10);
Last_Position : Natural; -- Variable to hold the last position
2023-10-25 15:02:27 +00:00
2023-10-25 14:04:40 +00:00
begin
-- Your program logic goes here
2023-10-25 15:02:27 +00:00
Ada.Text_IO.Put("Specify first imaginary number: ");
2023-10-25 15:28:39 +00:00
-- Read the user's input for the first number and store it in FirstInput.
Ada.Text_IO.Get_Line(FirstInput, Last => Last_Position);
2023-10-25 15:02:27 +00:00
2023-10-25 15:28:39 +00:00
Ada.Text_IO.Skip_Line;
-- Display the user's input for the first number.
Ada.Text_IO.Put_Line("You entered: " & FirstInput);
2023-10-25 15:02:27 +00:00
2023-10-25 15:28:39 +00:00
Ada.Text_IO.Put("Specify second imaginary number: ");
-- Read the user's input for the second number and store it in SecondInput.
Ada.Text_IO.Get_Line(SecondInput, Last => Last_Position);
-- Display the user's input for the second number.
Ada.Text_IO.Put_Line("You entered: " & SecondInput);
2023-10-25 14:04:40 +00:00
-- Example: Display a message
Ada.Text_IO.Put_Line("Hello, Ada!");
2023-10-25 15:28:39 +00:00
end Main;