VB程式設計,高分值

2022-06-08 12:11:26 字數 484 閱讀 1541

1樓:匿名使用者

底1題:

dim i as integer

dim j as integer

dim i17 as integer

dim i27 as integer

dim minc as integer = 1000dim c as integer

for i = 1 to (1000 - 27) \ 17for j = 1 to (1000 - 17) \ 27c = 1000 - i * 17 - j * 27if c >= 0 and c < minc thenminc = c

i17 = i

i27 = j

end if

next

next

msgbox("17米長的截:" & i17 & "段" & vbcrlf & "27米長的截:" & i27 & "段" & vbcrlf & "餘:" & minc & "米")

vb程式設計計算,VB程式設計計算 1 2

private sub command1 click dim i as integer,j as integerdim l as long,h as longfor i 1 to 10 h 1 for j 1 to i h h j next l l h next print l end sub pr...

vb程式設計教程答案,vb程式設計教程答案

option explicit private sub command1 click dim a as integer dim i,j,n redim a 9,9 for i 1 to 8 print tab 25 i 2 for j 1 to i a i,1 1 a i,i 1 a i 1,j 1...

VB程式設計計算s123,VB程式設計計算s

function ss tos as integer as integer tos參與復計算 制的最後一個數 dim i as integer ss 0 for i 1 to tos if i mod 2 0 then ss ss i else ss ss i end if next end fun...