Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - In VB, what is the value of the expression (18+253)Mod5? Please write down the meaning of this formula again. Thank you.
In VB, what is the value of the expression (18+253)Mod5? Please write down the meaning of this formula again. Thank you.
In VB, what is the value of the expression (18+25\3)Mod5? Please write down the meaning of this formula again. Thanks means that the value of (18+25\3)Mod5 is 1.

First of all, ""means divisible, 25\3 equals 8, and 18+8 equals 26.

Secondly, "Mod" means modulo, that is, finding the remainder. For example, the result of 8Mod5 is 3, which means that the remainder of 8 divided by 5 is 3. So 26Mod5 is equal to 1.

There is no debugging, and it is a verbal calculation!

What is the value of the expression "25\7+ 10 Mod 4" in Visual Basic? 25/7=3.57 1 ......

/10 mod 4= 2 (10 remainder obtained by dividing10 by 4)

The total is: 5.57 1. .....

The specific algorithm of the value of expression 5Mod3+3\5*2 is that 5Mod3 is the remainder of 5 divided by 3, which is 2.

3 \ 5 is 3 divided by 5, which equals 0.

So the whole thing must be: 2

In vb, let x=5 and the expression "10"

1. First, 10

2. Then use 10.

So the result of the whole expression is true.

What is the value of VB expression 23+23Mod 50 \ 7? How to calculate? 23+23 modulo 50 \ 7 = 23+(23 modulo (50 \ 7))

Calculate 50 \ 7 first, then Mod, then+.

The result is 25.

The expression18&; What is the value of 53? Non-zero numbers all represent 1 in the AND operation, so the sum of 18 and 53 is also 1. . .

What is the value returned by the expression (-12.7 Mod -5)? Mod operator

Used to divide two numbers and return only the remainder.

grammar

Result = number 1 modulo number 2

The syntax of Mod consists of the following parts:

Partial description

Need results; Any numeric variable.

The number1is required; Any numeric expression.

The number 2 is required; Any numeric expression.

explain

When performing a modular operation or a remainder operation, the operator divides the number 1 by the number 2 (rounding floating-point numbers to integers) and returns the remainder as the result value. For example, in the following expression, a (result) is equal to 5.

A = 19 Mod 6.7

Generally speaking, whether the result is an Integer or not, the data type of the result is Byte, Byte Variant, integer, integer Variant, Long or variant containing Long. Any fractional part will be deleted. However, if any type of Null expression appears, the result will be Null. Any empty type expression is treated as 0.

How to calculate the value of an expression? This is actually an implicit conversion, that is, when calculating different types of numbers, the number of placeholder bytes is converted into more bytes, and then the operation is performed. The conversion order is: char-& gt;; int->; The first double is 3/2, and the result is an int type, so it is 1 followed by 4.0* 1. Since 4.0 is a double-precision type, 1 is converted into a double-precision image multiplication, and the result is 4.0. The second one is actually the 5/2 mentioned just now, and the result should be an integer, which was originally 2.5. If it is an integer, it will be.

In VB, the value of the expression (14+34\4)Mod 4 is (). a、0 B、 1 C、2 D、3 34\4=8

14+8=22

22 mod 4=2

So the result is C 2

What is the value of VB expression int (-4.8) * 6 \ 3 2+fix (-4.8)? Solving ~ ~ is urgent! Msgbox Int(-4.8) * 6 \ 3 2+fix (-4.8) The answer is -7. First, int ($ NUMBER) is an integer transformation function, which transforms int (-4.8) into the nearest integer, here is -5 (that is, rounding). Then, according to the principle of multiplication and division before addition and subtraction, -5 is multiplied by 6 to get -30, and then -30 is divided by 3 2 (the square of 3, that is, 9), and -30/9 is approximately equal to. In other words, the final result after adding -4 is -3.333-4 = -7.333. Finally, take an integer ... but the difference here is that VB will automatically convert it into an integer when it is calculated to int (-4.8) * 6 \ 3 2, because the division sign here is not'/',but' \'. By default, VB allows the backslash to be divided, but it will take the integer part (not rounded).

Adopt it