早教吧作业答案频道 -->其他-->
excel里的VB语句怎么写?定义一个过程Bonus,在该过程内部定义三个long型变量:performance,salary,Bonus,设salary=5000.用InputBox 函数:请求用户输入:“请输入performance 的值:”,并赋值给performance,根据
题目详情
excel里的VB语句怎么写?
定义一个过程Bonus,在该过程内部定义三个long型变量:performance,salary,Bonus,设salary=5000.
用InputBox 函数:请求用户输入:“请输入performance 的值:”,并赋值给performance,根据以下规则来计算Bonus:
如果performance = 1 则Bonus = salary * 0.1
如果performance = 2 则Bonus = salary * 0.09
如果 performance = 3 Then Bonus = salary * 0.07
否则Bonus = 0
并将结果用Msgbox显示.
定义一个过程Bonus,在该过程内部定义三个long型变量:performance,salary,Bonus,设salary=5000.
用InputBox 函数:请求用户输入:“请输入performance 的值:”,并赋值给performance,根据以下规则来计算Bonus:
如果performance = 1 则Bonus = salary * 0.1
如果performance = 2 则Bonus = salary * 0.09
如果 performance = 3 Then Bonus = salary * 0.07
否则Bonus = 0
并将结果用Msgbox显示.
▼优质解答
答案和解析
Sub ply()
Dim performance As Long
Dim salary As Long
Dim Bonus As Long
salary = 5000
performance = InputBox("请输入performance 的值:")
If performance = 1 Then
Bonus = salary * 0.1
ElseIf performance = 2 Then
Bonus = salary * 0.09
ElseIf performance = 3 Then
Bonus = salary * 0.07
Else
Bonus = 0
End If
MsgBox Bonus
End Sub
测试成功!
张志晨
Dim performance As Long
Dim salary As Long
Dim Bonus As Long
salary = 5000
performance = InputBox("请输入performance 的值:")
If performance = 1 Then
Bonus = salary * 0.1
ElseIf performance = 2 Then
Bonus = salary * 0.09
ElseIf performance = 3 Then
Bonus = salary * 0.07
Else
Bonus = 0
End If
MsgBox Bonus
End Sub
测试成功!
张志晨
看了 excel里的VB语句怎么写...的网友还看了以下:
r,o,a,n,f,o,t,n,e连词成句是啥啊? 2020-03-31 …
下列各组词语中注音全部正确的一组是A.跬(kuǐ)步恣(zì)意涮(shuài)羊肉不屈不挠(rá 2020-05-16 …
英语字母o,b,n,p,r,t,x组成正确的单词有什么?字母u,b,g,h,j,s,t组成单词有 2020-06-12 …
立方差公式的推广证明过程(1)a^n-b^n=(a-b)[a^(n-1)+a^(n-2)*b+.. 2020-07-11 …
线性方程组Ax=b,有唯一解的充要条件是R(A)=R(A,b)=n,现在R(A)=n,则b怎样才能 2020-07-13 …
若R(B)=n,则线性方程BX=0只有零解.从而对任意n维列向量X不等于0,有BX不等于0.这后半 2020-08-01 …
1.下列加点字中注音全部正确的一项是()A.逃窜(càn)笃信(d?)啮齿(niè)饶有兴趣(ráo 2020-11-11 …
下列词语中加点的字注音全都正确的一组是()A.强劲(jìn)择菜(zhái)订正(dìng)扰动(r 2020-12-09 …
A.妖娆(ráo)B.绯(fēi)红C.丰硕(shuò)D.芳馨(xīn)重荷(hé)阔绰(chuò 2020-12-18 …
下列词语中加点字的读音全都正确的一项是()A.寥廓(liáo)句读(dòu)灰烬(jìn)不屈不挠( 2020-12-24 …