1樓:匿名使用者
樓上太長了...
四個文字框,前三個輸入,最後一個輸出
一個按鈕,按鈕的單擊響應**如下:
private sub command1_click()dim pingjun as doublepingjun = (val(text1.text) + val(text2.text) + val(text3.
text)) / 3
text4.text = pingjun
end sub
2樓:永恆的愛
version 5.00
begin vb.form form1
caption = "form1"
clientheight = 3120
clientleft = 60
clienttop = 420
clientwidth = 4680
linktopic = "form1"
scaleheight = 3120
scalewidth = 4680
startupposition = 3 '視窗預設
begin vb.commandbutton command3
caption = "退出"
height = 465
left = 3810
tabindex = 10
top = 2580
width = 765
endbegin vb.commandbutton command2
caption = "重填"
height = 465
left = 1620
tabindex = 9
top = 1770
width = 765
endbegin vb.commandbutton command1
caption = "計算"
height = 465
left = 2820
tabindex = 8
top = 1770
width = 765
endbegin vb.textbox text4
alignment = 2 'center
height = 375
left = 3420
tabindex = 6
top = 930
width = 825
endbegin vb.textbox text3
alignment = 2 'center
height = 375
left = 2070
tabindex = 2
top = 900
width = 825
endbegin vb.textbox text2
alignment = 2 'center
height = 375
left = 1170
tabindex = 1
top = 900
width = 825
endbegin vb.textbox text1
alignment = 2 'center
height = 375
left = 270
tabindex = 0
top = 900
width = 825
endbegin vb.label label4
autosize = -1 'true
caption = "平均成績"
height = 180
left = 3450
tabindex = 7
top = 720
width = 720
endbegin vb.label label3
autosize = -1 'true
caption = "英語成績"
height = 180
left = 2130
tabindex = 5
top = 690
width = 720
endbegin vb.label label2
autosize = -1 'true
caption = "數學成績"
height = 180
left = 1230
tabindex = 4
top = 690
width = 720
endbegin vb.label label1
autosize = -1 'true
caption = "語文成績"
height = 180
left = 330
tabindex = 3
top = 690
width = 720
endend
attribute vb_name = "form1"
attribute vb_globalnamespace = false
attribute vb_creatable = false
attribute vb_predeclaredid = true
attribute vb_exposed = false
private sub command1_click()
text4 = (val((val(text1)) + (val(text2)) + (val(text3))) / 2)
end sub
private sub command2_click()
text1 = ""
text2 = ""
text3 = ""
text4 = ""
end sub
private sub command3_click()
endend sub
3.編寫一個程式和介面輸入某學生的語文、數學英語三門課程的成績,單擊計算可以得出該學生的平均分和總分
3樓:匿名使用者
這個直接可以用excel可以做到啊!可以去學習下excel的操作
從三個文字框輸入一個學生語文數學英語三門課的成績,計算總分和平均分,並且輸出 程式設計題,,,,,拜 100
4樓:匿名使用者
void cmy222dlg::onbnclickedok()// 輸入資料合法性測試
bool cmy222dlg::inputtest(cstring cc, cstring ee, cstring ss)
if(!meisnumber(ee))
if(!meisnumber(ss))
return revalue;
}// 測試是否為資料
bool cmy222dlg::meisnumber(cstring x)
}return true;}
5樓:誰為誰空守舊夢
input x;x=(語文成績)
y;y=(數學成績)
z;z=英語成績
6樓:
燕燕哇dim a,b,c,d
a=val(text1.text)
b=val(text2.text)
c=val(text3.text)
d=(a+b+c)/3
print d
編寫程式,計算一個學生數學、語文、英語三門課的平均成績.
7樓:
class student
; student::student()
student::~student(){}int student::getname()int student::
getindividaulstuno()int student::getscore()void student::setname(int _name)void student::
setscore(int _score)void student::setindividualstuno(int _individualstuno)
#include
using namespace std;
int main()
編寫程式,計算學生數學 語文 英語三門課的平均成績
class student student student student student int student getname int student getindividaulstuno int student getscore void student setname int name vo...
哥哥的語文,數學,英語三門成績的平均分是92分,科學考了多少分,可以使平均分提
如果說這幾科的平均分都是92分的話,為了讓他的總體分數提高的話,那麼他這一科他的分數肯定要高於這個平均分也就是大於92分就可以使平均分得得到提高。王英的語文,數學的平均成績是92分,加上英語後三門的平均分是93.英語得了多少 93 3 92 2 279 184 95 小麗期末考試語文,數學的平均成績...
小紅考試語文數學平均分時90分,英語比三門低4分,英語多少分
1.設英語x,語文和數學平均分90分,那就一共180分,再加上英語x,除以3後得平均分,比x多4 180 x 3 x 4 解得x 84 2.11,13,19 3.1.2x 600 x 500 0.8x 600 x 750 500 750 1250 600 2 1200 1250 1200 50 賺了...