VB中判断奇偶 y=IIf(x mod 2,1,0) If y Then Print "奇数" Else Print "偶数" End If
为什么是if ythen
而不是if y=1 then呢?
if y 是什么意思
人气:227 ℃ 时间:2019-09-25 22:44:30
解答
一般编程语言都把逻辑判断true和false与整数1、0等价,即1就是true,0就是false,有时也是>0为true,=0为false,在vb中这样不是很规范,因为vb中有规定专门的数据类型:逻辑类型:true和false.
推荐
- VB 6.0 If x Then Print x Else Print x + 1
- A="abcd" B="bcde" E=right(a,3) F=mid(b,2,3) if e
- vb中的判断三个变量是否相等的表达式能否写成if a=b=c then print "a=b=c".
- 设函数f(x)=ax^2+bx^2+cx在x=1和x=-1处有极值,且f(1)=-1,求abc的值,并求出相应
- “慧”字组词
- she__( sing)in the hall.现在进行时怎么做
- winter,sweater,the,summer,palace,enginrrk,skitr,shop,autumn,blouse,singer,spring
- 六年级上第七单元习作
猜你喜欢