c08_ps04_sol

c08_ps04_sol - C8-1 Algorithm 1. Use a subtype to represent...

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

View Full Document Right Arrow Icon
C8-1 Algorithm 1. Use a subtype to represent the numbers for months 2. Use an enumeration to represent the named months 3. Use an enumeration to represent the roman months 4. Get the inputs from the user 5. Convert the month into roman and named formats using a. New_Type_Package’Val(Month_Type’Pos(Month) –1); 6. Display the months in all three formats to the user. Note: The enumerations range from 0 to (number_of_elements_in_Enumeration –1). Code Listing GNAT 3.13 p ( 20000509 ) Copyright 1992 - 2000 Free Software Foundation, Inc. Compiling: c:/docume~ 2 /jk/desktop/ 16070 /codeso~ 1 /translate_dates.adb (source file time stamp: 2003 - 09 - 24 01 : 35 : 00 ) 1 . -------------------------------------------------------------------- 2 . -- Program to accept different date formats 3 . -- Programmer : Jayakanth Srinivasan 4 . -- Date Last Modified : 09-23-2003 5 . -------------------------------------------------------------------- 6 . 7
Background image of page 1

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

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

Page1 / 3

c08_ps04_sol - C8-1 Algorithm 1. Use a subtype to represent...

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