1樓:岔路程式緣
稍等!好了!
把視窗拉大一點以方便在視窗上顯示內容,不用控制元件,點選視窗即可執行,**如下:
dim f(20, 12) as single, max as single, min as single
dim i as integer, j as integer, gd(2, 10) as integer
private sub form_click()
form1.autoredraw = true
randomize
for i = 1 to 20
print "第"; i; "名歌手得分:";
for j = 1 to 10
f(i, j) = int(rnd * 100) / 10
print format(f(i, j), "0.0"); " ";
next
max = f(i, 1)
min = f(i, 1)
f(i, 11) = 1
f(i, 12) = 1
f(i, 0) = f(i, 1)
for j = 2 to 10
f(i, 0) = f(i, 0) + f(i, j)
if max < f(i, j) then
max = f(i, j)
f(i, 11) = j
end if
if min > f(i, j) then
min = f(i, j)
f(i, 12) = j
end if
next
print "最高分"; format(max, "0.0"); "最低分"; format(min, "0.0");
f(i, 0) = f(i, 0) - max - min
f(i, 0) = f(i, 0) / 8
print " 得分"; format(f(i, 0), "0.0")
next
for i = 1 to 20
gd(1, f(i, 11)) = gd(1, f(i, 11)) + 1
gd(2, f(i, 12)) = gd(1, f(i, 12)) + 1
next
print "每個評委打出打出最高分和最低分的次數:"
for i = 1 to 2
if i = 1 then
print "最高分";
else
print "最低分";
end if
for j = 1 to 10
print gd(i, j);
next
next
end sub
已經執行過了。
2樓:匿名使用者
我幫你試試,[email protected]
C 程式設計題急急急急急急急急急急急急急急急
基本語法都好多錯誤啊!幫你改好了,好好學習 include class incout void show void istream operator istream is,incout cc ostream operator ostream os,incout cc include using na...
急急急使用excel中的vb來程式設計 求1000到
sub main dim str as string dim i as integer dim bfindflag as booleandim j as integer for i 1000 to 2000 step 1bfindflag false 求餘數 for j 2 to 2000 step...
一道C語言程式設計題急急急
include void main printf the sorted numbers n for i 0 i 10 i printf d a i printf n 已經上機執行過 就是用冒泡法啦 include int main 你沒描述清楚 如果是要輸入n個數後按從大到小的順序輸出我再改改 in...