
C2 Solutions
1. Modify the “Hello” program shown in class (Lecture C2) to display the following text
on the screen:
Hello World
My name is Your Name
Compiling: c:/docume~2/joeb/desktop/16070/concep~1/hello_world.adb (source file time stamp: 2003-09-
10 08:55:28)
1. -----------------------------------------------------
2.
3.
4.
5.
6. ------------------------------------------------------
7.
8.
9. with Ada.Text_Io;
10.
11. procedure Hello_World is
12.
13. begin -- Hello_World
14.
15. Ada.Text_Io.Put(Item => "Hello World ");
16. Ada.Text_Io.New_Line;
17. Ada.Text_Io.Put(Item => "My Name is Joe B");
18.
19. end Hello_World;
19 lines: No errors
2. There are two errors that are seen:
i. “raised SCREEN.WIN32_FILL_SCREEN_ERROR : screen.adb:99” is seen when the
output is redirected to the file.
ii. “raised SPIDER.HIT_THE_WALL: spider.adb:224” is seen when the output is only
displayed on the screen
3. Write an algorithm to use the Feldman “spider package” to draw an inverted triangle as
shown below. Turn in a hard copy of your code listing and an electronic copy of your
code.
RRRRRRR
R R
R R
R