Imperative language

For the exercises below (except for the first one), don't worry about the details of the `Main` procedure. You should just focus on implementing the application in the subprogram specified by the exercise.

Hello World

Goal: create a "Hello World!" application.

Steps:

1. Complete the `Main` procedure.

Requirements:

1. The application must display the message "Hello World!".

```

procedure Main is
begin
--  Implement the application here!
null;
end Main;

Use tabbed editor view

Use the dark theme

-g

-O0

-gnata

-gnatW8

-gnatwa

-gnatyg0-s

-gnatyM50

-gnatyM80

-gnato

-gnato0

-gnato11

-gnato21

-gnato22

-gnato23

-gnateE

-gnatX

```

Greetings

Goal: create an application that greets a person.

Steps:

1. Complete the `Greet` procedure.

Requirements:

1. Given an input string `<name>`, procedure `Greet` must display the message "Hello <name>!".

1. For example, if the name is "John", it displays the message "Hello John!".

Remarks:

1. You can use the concatenation operator (`&`).

```

procedure Main is

procedure Greet (Name : String) is
begin
--  Implement the application here!
null;
end Greet;

begin
if Argument_Count < 1 then
Put_Line ("ERROR: missing arguments! Exiting...");
return;
elsif Argument_Count > 1 then
end if;

Greet (Argument (1));
end Main;

Use tabbed editor view

Use the dark theme

-g

-O0

-gnata

-gnatW8

-gnatwa

-gnatyg0-s

-gnatyM50

-gnatyM80

-gnato

-gnato0

-gnato11

-gnato21

-gnato22

-gnato23

-gnateE

-gnatX

```

Positive Or Negative

Goal: create an application that classifies integer numbers.

Steps:

1. Complete the `Classify_Number` procedure.

Requirements:

1. Given an integer number `X`, procedure `Classify_Number` must classify `X` as positive, negative or zero and display the result:

1. If `X > 0`, it displays `Positive`.

2. If `X < 0`, it displays `Negative`.

3. If `X = 0`, it displays `Zero`.

```

procedure Classify_Number (X : Integer);

procedure Classify_Number (X : Integer) is
begin
--  Implement the application here!
null;
end Classify_Number;

with Classify_Number;

procedure Main is
A : Integer;
begin
if Argument_Count < 1 then
Put_Line ("ERROR: missing arguments! Exiting...");
return;
elsif Argument_Count > 1 then
end if;

A := Integer'Value (Argument (1));

Classify_Number (A);
end Main;

Use tabbed editor view

Use the dark theme

-g

-O0

-gnata

-gnatW8

-gnatwa

-gnatyg0-s

-gnatyM50

-gnatyM80

-gnato

-gnato0

-gnato11

-gnato21

-gnato22

-gnato23

-gnateE

-gnatX

```

Numbers

Goal: create an application that displays numbers in a specific order.

Steps:

1. Complete the `Display_Numbers` procedure.

Requirements:

1. Given two integer numbers, `Display_Numbers` displays all numbers in the range starting with the smallest number.

```

procedure Display_Numbers (A, B : Integer);

procedure Display_Numbers (A, B : Integer) is
begin
--  Implement the application here!
null;
end Display_Numbers;

with Display_Numbers;

procedure Main is
A, B : Integer;
begin
if Argument_Count < 2 then
Put_Line ("ERROR: missing arguments! Exiting...");
return;
elsif Argument_Count > 2 then
end if;

A := Integer'Value (Argument (1));
B := Integer'Value (Argument (2));

Display_Numbers (A, B);
end Main;

Use tabbed editor view

Use the dark theme

-g

-O0

-gnata

-gnatW8

-gnatwa

-gnatyg0-s

-gnatyM50

-gnatyM80

-gnato

-gnato0

-gnato11

-gnato21

-gnato22

-gnato23

-gnateE

-gnatX

```