
Светлана
5 год назад
Задание в Visual basic . Введите 2 числа , если их разность больше 8 , то числа перемножить в противном случае сложить.
ОТВЕТЫ

Roza
Oct 24, 2020
Dim a As Integer, b As Integer
Private Sub CommandButton1_Click()
a = TextBox1.Value
b = TextBox2.Value
If a - b > 8 Then
CommandButton1.Caption = "Произведение = " & (a * b)
Else
CommandButton1.Caption = "Сумма = " & (a + b)
End If
End Sub
Private Sub CommandButton1_Click()
a = TextBox1.Value
b = TextBox2.Value
If a - b > 8 Then
CommandButton1.Caption = "Произведение = " & (a * b)
Else
CommandButton1.Caption = "Сумма = " & (a + b)
End If
End Sub
751
Смежные вопросы: