Clock ain` working

by Mauro (no login)

 

I made a program that shows time but it doesn`t work.What`s the problem?

10 CLS
20 PRINT "This is a clock.In order to work you need to set the time.The Program will ask you first about hour,then minute,and then second."
30 INPUT "What hour is it"; s$
31 IF s$ > 23 THEN
32 PRINT "Error.Try again"
33 GOTO 30
34 ELSE GOTO 40
40 INPUT "What minute is it"; m$
41 IF m$ > 59 THEN
42 PRINT "Error.Try again"
43 goto40
44 ELSE GOTO 50
50 INPUT "What second is it"; sec$
51 IF sec$ > 59 THEN
52 PRINT "Error.Try again"
53 GOTO 50
54 ELSE GOTO 60
60 DO
70 sec$ = sec$ + 1
80 SLEEP 1
90 IF sec$ = 60 THEN
100 sec$ = 0
110 m$ = m$ + 1
120 ELSE GOTO 130
130 IF m$ = 60 THEN
140 m$ = 0
150 s$ = s$ + 1
151 BEEP
160 ELSE GOTO 170
170 IF s$ = 24 THEN
180 s$ = 0
190 ELSE GOTO 200
200 LOOP
210 END



Posted on Jul 29, 2009, 5:15 PM

Respond to this message   

Goto Forum Home

Response TitleAuthor and Date
A few things need correcting...TheBOB on Jul 29
*What happened to line 43?Ben on Jul 29
TIME$ is given automatically .......Clippy on Jul 29

 Copyright © 1999-2017 Network54. All rights reserved.   Terms of Use   Privacy Statement  

Quantcast