lab_mid_sample09

lab_mid_sample09 - CSci 1113 Spring 2009 Lab Midterm 90...

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

View Full Document Right Arrow Icon
1 CSci 1113 Spring 2009 Lab Midterm – 90 Minutes Section 2: Monday 1:25-5:25 In your home directory, create a new directory called midterm and move to that directory using the following commands: cd mkdir midterm cd midterm Do all of your work for the lab midterm exam within this directory. The lab midterm will consist of three problems. Save your source code for the three problems in files named midtermA.cpp, midtermB.cpp, and midtermC.cpp, respectively. Do not overwrite or delete your source code, even if you have compiled it and have an executable file. A. (30 points) Time Zone Program We often need to know the time in another time zone. In the United States, compared to our Central time, the Eastern (E) time is one hour ahead, the Mountain time (M) is one hour behind, and the Pacific (P) time is two hours behind (the minutes are the same in all the zones, of course). For this problem you will use a 24-hour clock. For example, Central time 23:45 is 00:45 in the Eastern zone. Create a new file called midtermA.cpp . Write a program to determine the hour in another time zone given the hour in Central time. Your program should: Obtain a Central time (hour, minute) and the desired other time zone (E, M, or P) in the main function. Call a
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.

This note was uploaded on 10/28/2010 for the course CSCI 1113 taught by Professor Staff during the Spring '08 term at Minnesota.

Page1 / 4

lab_mid_sample09 - CSci 1113 Spring 2009 Lab Midterm 90...

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