轮胎质量等级怎么看:高分求教简单的编程问题

来源:百度文库 编辑:杭州交通信息网 时间:2024/05/05 23:41:47
x y
y=<8 输出 1 to y
y>8 有三种情况
x=<4 输出 输出 1至8
x>4 and y-x>=4 输出 x-4 to x+4
y-n<4 输出 y-8 to y
我想改分页代码,就是分页的时候固定一个页面多少页,谢谢高手帮忙,我先尝试一下

if (y<=8) then
..for i=1 to y
....debug.print i
..next
endif

if (y>8) then
..if (x<=4) then
....for i=1 to 8
......debug.print i
....next
..elseif (x>4 and y-x>=4) then
....for i=x-4 to x+4
......debug.print i
....next
..elseif (y-n<4) then
....for i=y-8 to y
......debug.print i
....next
..endif
endif

分页哪里需要这么复杂。。
知道总条数,每页个数,做浮点除法,然后对结果进行向上取整就可以了。。

if y<=8 then
for i = 1 to y
debuy print i
next i
end if
if y>8 then
if x<=4 then
for i =1 ti 8
debuy.printi
next i
elseif x>4and y-x>=4 then
for i=x-4 to x+4
debug.print i
next
elseif (y-n<4) then
for i=y-8 to y
debug.print i
next
endif
endif

不知道你想干什么!!!

nan