VB 编写程序,求函数y的值(当x小于等于0时,y=3x+1;当x>0时,y=4x+1)
人气:115 ℃ 时间:2020-04-27 00:41:31
解答
Dim ax,y As Integer
Private Sub Command1_Click()
x = Text1.Text
If x > 0 Then
y = 4 * x + 1
Else:y = 3 * x + 1
End If
Text2.Text = y
End Sub
Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
End Sub
推荐
猜你喜欢
- 耽搁 (1、停留 2、耽误) 造句
- x-120=七分之六x乘十分之九
- There's a line between a thin girl and a sick on (10)is often crossed.翻译
- 某工厂第一车间有m人,第二车间的人数比第一车间的2倍少5人,第三车间的人数比第一车间
- 将句子合并定语从句 The boy is shy.he is wearing a black coat.
- 找规律填数:2,4,13,61,( ),( )
- 已知抛物线y=x2+bx+c交x轴于点A(x1,0),B(x2,0),顶点为p.若S?APB=1,则b与c有何关系?
- 因式分解:x2-2xy-3y2+2x+10y-8.