Campbell Ritchie wrote:Welcome to the Ranch
As Ulf said, please show us what you achieved already.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
fred rosenberger wrote:What you are doing wrong is writing too much code at a time. just try and do one little part at a time. for example, see if you can just print the hours, from 0 to 24.
Once you can do that, see if you can print the hours twice, once in 24-hour format, and once in 12 hour format.
Then try and add in the next piece, and then the next.
Never try and do part 2 until you have part 1 working.
fred rosenberger wrote:What you are doing wrong is writing too much code at a time. just try and do one little part at a time. for example, see if you can just print the hours, from 0 to 24.
Once you can do that, see if you can print the hours twice, once in 24-hour format, and once in 12 hour format.
Then try and add in the next piece, and then the next.
Never try and do part 2 until you have part 1 working.
harman brar wrote:Thannks for the advice
then show us that codesee if you can just print the hours, from 0 to 24.
show us that code, etcsee if you can print the hours twice, once in 24-hour format, and once in 12 hour format.
There are worse crimes than burning books. One of them is not reading them. Ray Bradbury