So essentially I'm completely lost with this problem our professor gave us. I was absent for the lecture, and he isn't very keen on uploading the lecture notes before our assignments are due. Anyway, the program to be written goes something like this.

We need to write a non-graphical program that gets a time in hours, minutes and the am/pm from a user, and have it calculate how many minutes frmo midnight that specific time is. The format the times should be entered in is hh:mmx where x can equal a or p for AM or PM respectively.

So, if we decide to enter 01:00p, the program should calculate 13x60=780 minutes that have passed since midnight. Honestly I'm stumped. I understand the concept, but can't for the life of me figure out how to put it into code. Any help or explanation would be extremely appreciated! Thank you.