c02_ps02_sol

c02_ps02_sol - C2 Solutions 1. Modify the Hello program...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 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 GNAT 3.13 p ( 20000509 ) Copyright 1992- 2000 Free Software Foundation, Inc. Compiling: c:/docume~ 2 /joeb/desktop/ 16070 /concep~ 1 /hello_world.adb (source file time stamp: 2003- 09- 10 08 : 55 : 28 ) 1 . ----------------------------------------------------- 2 . -- Program : To Display "Hello World 3 . -- My Name is Joe B" 4 . -- Programmer : Joe B 5 . -- Date Last Modified : 09/10/2003 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 as3....
View Full Document

This note was uploaded on 01/28/2012 for the course AERO 16.01 taught by Professor Markdrela during the Fall '05 term at MIT.

Page1 / 3

c02_ps02_sol - C2 Solutions 1. Modify the Hello program...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online