aboutsummaryrefslogtreecommitdiffstats
path: root/ee1301/wk2/hw2_directory/strap012_2B.cpp
blob: 15c81528f82778ddbbe902e5a42ade9dd89f90ed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
Date: 20 Feb 2019
Name: Matthew Strapp
Student ID number: 5449340
Course number: EE1301
Term: Spring 2019
Lab/assignment number: Homework 2B
Short Program Description: Time Travel Calculator
*/
//15

#include <iostream>
using namespace std;
int main()
{

  bool change12=0, foo=0, bar=false; //Workaround to prevent unneeded if statements
  char Time, travel;          //"time" is reserved by C++, "Time" is not
  int hourOG, hourChange, hourNew, intervalChange = 0, timeChange = 1;
  cout << "Enter current time (A for AM, P for PM): ";
  cin >> hourOG >> Time;
  cout << "How many hours forward or backward do you want to move the clock (F for forwards, B for backward): ";
  cin >> hourChange >> travel;