Analyze the values of the following VB expressions Let x = 5, y = 15, z = 3 1、len(x & y & "z") 2、sgn(10 mod 6) & x+y 3、x mod z + x^2\y+z 4、(y mod 10)* 10+y\10 5、mid(str(x^3),2,2) & y+z

Analyze the values of the following VB expressions Let x = 5, y = 15, z = 3 1、len(x & y & "z") 2、sgn(10 mod 6) & x+y 3、x mod z + x^2\y+z 4、(y mod 10)* 10+y\10 5、mid(str(x^3),2,2) & y+z


1. X & Y & Z is 515z, so len (X & Y & z) is 4
2、120
3、6
4、51
5、1218



How to write the expression that x is a multiple of 4 or 13 in VB


if (x mod 4=0) or (x mod 13=0) then
Print "x is a multiple of 4 or 13"
end if



On VB expression
5 mod 3+3╲5*2
I worked out 5! Was I wrong! Or was the question wrong!


The answer is 2
Priority of arithmetic operation in VB
1. Exponential operation (^)
2. Negative (-)
3. Multiplication and division (*, /)
4. Integer division (\)
5. Modular operation (MOD)
6. Addition and subtraction (+, -)
7. String connection (&)
So let's start with 3 / 5 * 2 = 0 * 2 = 0
Then 5 mod 3 = 2
Finally, 2 + 0 = 2