previouses2 - S. Karaki American University of Beirut March...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
S. Karaki American University of Beirut March 20, 2003 Department of Electrical and Computer Engineering EECE 230 - Section 3: Quiz # 1 (Duration 2 Hours) Purpose: To test you ability in writing programs to solve simple problems using repetition and selection structures. 1. Write a program that reads a time period given in seconds (integer) and calculates and prints the corresponding number of hours, minutes, and seconds. Assume the number of seconds entered ranges from 0 sec to 1day. 2. In many countries, car license plates contain a combination of letters and digits. Consider a country where license plates have 2 letters and 4 digits, e.g., AV 3469. The plates are usually allocated in sequence starting with AA 0000, AA 0001 … AA 9999, AB 0000, AB 0001, until ZZ 9999. Write a program that reads one license plate number as input (two characters and an integer) and outputs the contents of the next plate to be allocated. Note that the ASCII code of letter A is 65 and that of Z is 65+25. 3.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/26/2010 for the course EECE 230 taught by Professor Samikaraki during the Fall '07 term at American University of Beirut.

Ask a homework question - tutors are online