Hello All,
I am working on a school assignment, a simple console program. I am to ask for input of time in 24 hour time, and convert to minutes(then do some calculations). I am stuck. I was told I could use modulus function to do this, but still can't figure it out.
I do not want to use a military time statement, I want to be able to take in the info. If I can separate the 4 digits, I would be good from there. So user enters 0930, and I can take that in as two pieces, one for 09 hours, and another for 30 minutes.
As you can see, I am in over my head. Can anyone help?
Thanks

1 answers
I can't see what the modulus function has got to do it with either.
However, try this code instead:
Ideally, you also need to add some error checking code but, hopefully, that will get you started.
answered one year ago by:
17279
18
Thank you! That worked beautifully. It took me a minute to figure out that it was necessary to type 0930, and not only 930. I will now play with that substring to see if I can understand it better. Thanks for the time.