hello!

I need a program that validates the input of time. (in 24hr format)

The user enters: hhmmss

The problem is, I have trouble with complex programs. I came up with this program, but i know it's too basic for what she wants. I need to have arrays in there, but i don't know how. I would love any help considering I'm bad at understanding this subject.


could someone help me ???!!!

Recommended Answers

All 2 Replies

First tell us in clear language
- what the input of your program should be (provide a sample).
- what the output of your program should be (provide a sample).

Then show us what you've done so far, and then we can probably help you.

"The user enters: hhmmss "

like this I assume : 074023

which is = 7:40:23

1) check if the 1st and 2nd number is <= 24
2) check if 3rd and 4th number is <= 60
3) check if 5th and 6th number is <= 60

if all return true, then output what you need.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.