Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Program for calculating Time Delay.
Post Flair (click to view more posts with a particular flair)
Post Body

A user wishes to enter a starting time AM/PM format, and delay time in hours and minutes, and have the computer compute and display the time (in AM/PM format) at the end of the delay. This process should repeat until the user enters 999 for the hours portion of the start time. Note: The user will enter the start time as two integers and either 'A' 'a' 'P' 'p' with a space (or spaces in between them, the first representation the hours portion of the time , and second representation the minutes portion of the time and the characters representing either AM or PM. The delay timed will be entered in a similar way.

Example: if the user enters the time 10 13 A and a delay time of 2 05 then the computer should display 12:18pm as the time at the end of the delay.

The program is by no means finished but I have no clue where to go from where I am at in the program. It could all be wrong for what I know. Any help would be appreciated

//Programming project #2

include <iostream>

void computeTimeDifference(int& H, int& M, int& H1, int& M2, int AP ) int main() { int H; int M; int H1; int M2; int AP;

cout << "Enter start time." << endl;
cout << "Enter hours and minutes aswell as either A for AM or P for PM: ";
cin >> H >> M >> AP >> endl;

cout << "Enter delay time." << endl;
cout << "Enter hours and minutes: ";
cin >> H1 >> M2 >> endl;

computeTimeDifference(int& H, int& M, int& H1, int& M2, int AP);

cout << endl << "Delay Time: " <<  << ":" << endl;
return 0;

} void computeTimeDifference(int& H, int& M, int& H1, int& M2, int AP) {

Author
Account Strength
90%
Account Age
8 years
Verified Email
Yes
Verified Flair
No
Total Karma
666
Link Karma
660
Comment Karma
6
Profile updated: 3 days ago
Posts updated: 1 year ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
7 years ago