CSCI 150, Spring 2003

Home | | Course Schedule | | Assignments | | Lecture Notes

Laboratory 2
Due at the end of today's class

Problem #1.

Write a Pascal program (named word.pas) which inputs a string and prints the string with its first and last characters removed. (This is essentiallly question #2 on page 58 of your text.)

A sample session might look like the following:

Please enter a word:
shows
The stripped word is how.

Note: User input is in the solid box.

Problem #2.

Type in the following Pascal program skeleton. Fill in the necessary code for the decision tree on page 7 of your textbook.

A sample session might look like the following:

Are you married?
yes
Are you filing jointly or separately?
jointly
Enter $2000 on line 7

 

Note: User input is in the solid box.

What To Turn In.

A printed listing of each lab program. Be sure that your name is in the program prologue’s comment section of EACH program.

 

Reminder.

Be sure to save a copy of each program on your P:\ drive, and delete your working copies from your D:\ drive.