IPT - A Virtual Approach IPT A Virtual Approach by Peter Whitehouse
Quick Links:
 
 
Information and Intelligent Systems Social and Ethical Implications Human Computer Interaction Software and Systems Engineering eXercise Files Course Outline and Assessment A-Z of Geeky Acronyms Terrace Work Program 2004 Sillybus FAQ = Frequently Asked Questions Help
 
 

eXercise #3

Programmed Output

1. Write showmessage calls which reproduce the following lines of text exactly.

  1. "Maybe", he said.
  2. This is john's output.
  3. 'The Terrace Family'

2. Write Pascal programs to create the following output. Your programs should use the smallest amount of code possible. The rulers (Dashed lines) are there for your convenience and do not form part of the output, they merely show you the required spacing. Prudent use of FIELD WIDTH and DEC PLACES is encouraged.


 (a)---------    (b)---------    (c)---------
    the                   the               1
    albatross       albatross           32767
    did not           did not            TRUE 
    signify           signify           11.83

 (d):--------:---------:---------:--------:---------:-----
    Student                Age          Date of Birth
    (Surnam first)        (Yrs)        Date Month Year

3. Showmessage calls which output the following:

  1. The character 'I' with 5 spaces in front of it.
  2. The value true in a field of width 10.
  3. -72 with 2 leading spaces.
  4. 173.984 In exponential format in a field of width 15.
  5. 173.984 in exponential format to four significant figures.
  6. -173.984 in conventional format to two decimal places with no leading spaces.

Solutions

wonko@wonko.info
©Copyright t 1992..2017+. Edition 25.150117
wonkosite
Creative Commons License
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 2.1 Australia License
.