Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,15 @@
|
|||
100 PROGRAM "Seconds.bas"
|
||||
110 NUMERIC UN(1 TO 5),SEC,UNIT
|
||||
120 STRING T$(1 TO 5)*3
|
||||
130 LET UN(1)=604800:LET UN(2)=86400:LET UN(3)=3600:LET UN(4)=60:LET UN(5)=1
|
||||
140 LET T$(1)="wk":LET T$(2)="d":LET T$(3)="hr":LET T$(4)="min":LET T$(5)="sec"
|
||||
150 INPUT PROMPT "Duration in seconds: ":SEC
|
||||
160 PRINT SEC;"sec =";
|
||||
170 FOR I=1 TO 5
|
||||
180 IF SEC>=UN(I) THEN
|
||||
190 LET UNIT=INT(SEC/UN(I)):LET SEC=MOD(SEC,UN(I))
|
||||
200 PRINT UNIT;T$(I);
|
||||
210 IF I<4 AND SEC>0 THEN PRINT ",";
|
||||
220 END IF
|
||||
230 NEXT
|
||||
240 PRINT
|
||||
Loading…
Add table
Add a link
Reference in a new issue