-
x 100) is calculated with a floating point that is of the double type, and the result is also a floating point, so that when the structure has a floating point for int conversion, the decimal rounding calculation method will be carried out, so that the result is different.
You can calculate the single digit first, then subtract the single digit, and then count the ten digits, which will make the single digit 0, and the result of Yes will keep the decimal place at 0, so that there will be no five.
MSDN is partially stated:
It is used to divide two numbers and return a floating-point number.
Grammar. result = number1/number2
The syntax of the operator has the following parts:
Section description.
result required; Any numeric variable.
number1 required; Any numeric expression.
number2 required; Any numeric expression.
Illustrate. The data type for result is usually a double or a double variant. The following are exceptions:
If then the result is.
When both expressions are byte, integer, or single expressions, one single, unless it is outside the correct range; If this happens, an error is generated.
Both expressions are byte, integer, or single variants, and one single variant, unless the correct range is exceeded; Once this happens, the result is a variant that contains a double.
There is a decimal and any other data type in the division operation, and a decimal data type.
If one or both expressions are null expressions, the result is null. If an expression is empty, it is treated as 0.
-
Your question: 1. VB is a quotient, which will be rounded, and it is also a quotient, but as long as the integer part and the number after the decimal point are rounded off, you should use not to use .
Second, you have a problem calculating hundreds, tens, and **.
-
dim x % ten %, hundred, and the % variable should not have a space between the %.
dim x% , ten%, hundred% plus a textbox control.
Enter three digits in the textbox.
Click on the form to output the result.
Tested **Yes.
-
private sub form_click()dim x % ten %,hundred %x = val(
ten = int(x / 10) mod 10hundred = int(x / 100 ) mod 10print "The hundredths are:" & hundredprint "The tens are:" & ten
print "The single digits are:" & x mod 10end sub
-
a*b=0 is easy to understand, that is, one of them is 0;
a<>b is ab, that is, a is not equal to b, and both a and b cannot be 0 at the same time, so the Boolean expression of the condition "one of the two integer variables a and b is 0, but cannot be 0 at the same time" cannot be correctly expressed.
The correct answer is d
*ADDITIONAL NOTE***
In the original question, the incorrect answer was asked instead of the correct answer, so a friend downstairs said that there was a possibility that answer D was zero A and B, and did not meet the proposed requirements.
-
If you choose d, a*b=0 is likely to be 0 for both a and b, and for a=0 or b=0 is possible, ,b<>0 or. <>0 , b=0 , b are all 0, so d has the possibility that both a and b are 0!
-
This is easy to do.
If needed, I did it quickly.
option explicit statement.
Used at the module level to force all variables in the module to be explicitly declared. >>>More
1. Eating garlic can effectively repel mosquitoes, because mosquitoes don't like the smell of garlic secreted by the human body, or put a few garlic heads indoors to repel mosquitoes. The disadvantage is that the taste is unpleasant, and it is estimated that not a few mm will like it. 2. Oral vitamin B is discharged from the body after being metabolized by human physiology, which will produce a smell that mosquitoes dare not approach. >>>More