randomize
x = 80 : y = 80 // 画像サイズ
keta = 6 // 桁数
rnd value, 1000000
buffer 2, x * 10, y
boxf : color 255
repeat 9, 1 : boxf cnt * x + 5, 5, cnt * x + 15, 40 : loop
repeat 8, 2 : boxf cnt * x + 25, 5, cnt * x + 35, 40 : loop
repeat 7, 3 : boxf cnt * x + 45, 5, cnt * x + 55, 40 : loop
repeat 6, 4 : boxf cnt * x + 65, 5, cnt * x + 75, 40 : loop
repeat 5, 5 : boxf cnt * x + 0, 15, cnt * x + 80, 30 : loop
repeat 4, 6 : boxf cnt * x + 5, 40, cnt * x + 15, 75 : loop
repeat 3, 7 : boxf cnt * x + 25, 40, cnt * x + 35, 75 : loop
repeat 2, 8 : boxf cnt * x + 45, 40, cnt * x + 55, 75 : loop
repeat 1, 9 : boxf cnt * x + 65, 40, cnt * x + 75, 75 : loop
gsel 0
pos 10, 10 : mes "数値"
pos 50, 10 : input value, 100, 20, keta
pos 150, 10 : button "表示", *show
gmode 2, x, y
stop
*show
int value : omomi = 1
redraw 0
color 255, 255, 255 : boxf , 50 : color
repeat keta
pos (x + 10) * (keta - cnt), 60 : gcopy 2 , value / omomi \ 10 * x
pos (x + 10) * (keta - cnt) + (x / 2), 150 : mes value / omomi \ 10
omomi = omomi * 10
loop
redraw 1
stop
|