vb表达式求解1、已经a=3,b=4,c=5求a or b + c and b - c2.、Not 4*(76-43)^
来源:学生作业帮 编辑:搜搜做题作业网作业帮 分类:数学作业 时间:2024/06/07 15:47:28
vb表达式求解
1、已经a=3,b=4,c=5
求a or b + c and b - c
2.、Not 4*(76-43)^2 and 5 < 4 Or 5 - 3 > 0
1、已经a=3,b=4,c=5
求a or b + c and b - c
2.、Not 4*(76-43)^2 and 5 < 4 Or 5 - 3 > 0
'在窗体建一个命令按钮Command1
'1.
Private Sub Command1_Click()
Dim s, a, b, c As Integer
a = 3
b = 4
c = 5
s = a Or b + c And b - c
s1 = 3 Or 9 And -1
'算术运算符优先级最高,即表达式s=s1= 3 Or 9 And -1
'or和and同级按先后
'当and在两个数字中间时,and运算符就不是逻辑与运算符而是位与运算符了,3or9换成二进制就是11or1001=1011,十进制是11
'11and-1换成二进制是1011and11=1011,十进制是11,所以结果是11
Print s1, s
End Sub
'2.
Private Sub Command1_Click()
s = Not 4 * (76 - 43) ^ 2 And 5 < 4 Or 5 - 3 > 0 '先算术运算,其次比较运算得s1
s1 = Not 4356 And False Or True '即s2
s2 = -4356 And False Or True '即s3
s3 = 0 Or True '结果为-1
Print s, s1, s2, s3
End Su
'1.
Private Sub Command1_Click()
Dim s, a, b, c As Integer
a = 3
b = 4
c = 5
s = a Or b + c And b - c
s1 = 3 Or 9 And -1
'算术运算符优先级最高,即表达式s=s1= 3 Or 9 And -1
'or和and同级按先后
'当and在两个数字中间时,and运算符就不是逻辑与运算符而是位与运算符了,3or9换成二进制就是11or1001=1011,十进制是11
'11and-1换成二进制是1011and11=1011,十进制是11,所以结果是11
Print s1, s
End Sub
'2.
Private Sub Command1_Click()
s = Not 4 * (76 - 43) ^ 2 And 5 < 4 Or 5 - 3 > 0 '先算术运算,其次比较运算得s1
s1 = Not 4356 And False Or True '即s2
s2 = -4356 And False Or True '即s3
s3 = 0 Or True '结果为-1
Print s, s1, s2, s3
End Su
一道计算机VB二级题设a=5,b=4,c=3,d=2,下列表达式的值是()3>2*b Or a=c And b c Or
已经a=3.5,b=5.0,c=2.5,d=true.表达式a>=0 and a+c>b+3 or not d的值是多少
VB选择题设a=2,b=3,c=4,下面表达式的值是6>2*a or a+b=c and bc or c>d
设a=3,b=4,c=-1,写出以下逻辑表达式的值.a-b/c-d or c>d and not c>0 or d
VB 2005中 已知a=3.5,b=5.0,c=2.5,d=True,则表达式:a>=0 AND a+c>b+3 OR
=4,b=3,c=2,d=1下列表达式的值是a大于b+1 or c小于d and b mod c
设a=3,b=4,c=5,计算表达式的值:a+b>c.and.a+c>b.and.b+c>a
vb中 已知a=2,b=3,c=4,d=5,下列表达式的值是 a>b AND cc
a = 3:b = 4:c = 5 d = a > b And b < c And a < c Or a \ b = c
已经a=3.5,b=5.0,c=2.5,d=true.表达式a>=0 and a+c>b+3 or not d的值是fa
a2+b2+c2-ab-2c-3b+4=0 求a+b+c
求下列VB表达式的值5>2 and 4=55>2 or 4=55>2 and not 4=5“A”>“B” and 5>