Advertisement
Abaduaber

OksBar_1

Apr 26th, 2013
367
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QBasic 0.23 KB | None | 0 0
  1. DIM V AS INTEGER, I AS INTEGER, P AS LONG, T$
  2. DO
  3.     INPUT "Input value [1000..9999]: ", V
  4. LOOP WHILE V < 1000 OR V > 9999
  5. T$ = LTRIM$(STR$(V)): P = 1
  6. FOR I = 1 TO LEN(T$)
  7.     P = P * VAL(MID$(T$, I, 1))
  8. NEXT I
  9. PRINT "P ="; P
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement