A Level 2 VB question, ask for advice!

Updated on educate 2024-05-10
7 answers
  1. Anonymous users2024-02-10

    private sub command1_click()(100, -100)-(100, 100)dim x%, y%

    x = int((rnd - 200)y = int((rnd - 200)if x > 0 then

    if y > 0 then

    msgbox x & "," & y & "First"

    end if

    if y < 0 then

    msgbox x & "," & y & "Fourth"

    end if

    elseif x < 0 then

    if y > 0 then

    msgbox x & "," & y & "Second"

    end if

    if y < 0 then

    msgbox x & "," & y & "Third"

    end if

    end if

    end sub

    How could it not be used... I put it on after I tried it.

  2. Anonymous users2024-02-09

    If you studied analytic geometry in high school.

    If you've learned the basic conditionals of VB, then the question is obviously pediatric.

  3. Anonymous users2024-02-08

    Take a center point, draw a coordinate axis, and find the angle of the point. Then judge: 0-90:

    First Quadrant. 90-180: Second quadrant.

    180-270: Third quadrant. 270-360:

    Fourth Quadrant.

  4. Anonymous users2024-02-07

    Just use if.

    if x<0 x>0

    if y<0 y>0

    Finally, it is enough to judge the axis.

  5. Anonymous users2024-02-06

    Question 1: No matter how many case clauses meet the condition, only the statement after the first case clause that satisfies the condition will be executed. In this case, case 1 to 20 is the first clause that satisfies the condition, so the program executes the x = 10 statement and jumps to the end select statement.

    Question 2: Since the num variable is declared as integer, it will be automatically converted to the integer value 2 when added, and then the addition operation will be done.

    Question 3: Since the loop condition is loop while, the value of the expression that follows it must be true in order to continue the loop. But a has a value of 7, so the loop ends, which means that the loop body only runs once.

    Question 4: Although X is declared at the process level, since X is declared with static statements, the scope of X is global. That is, x is also valid in the function f.

    In the function f, x is assigned a value of 20, and the value of x remains 20 after the function is called.

    Question 5: Since the variable x in the process fun is passed by value (byval) instead of by address (byref), the variable x is a new variable in the fun process, but it is initially given the value of the variable x in the call process, and when the fun process is over, its x variable also dies. Therefore, the value of the variable x in the command1 click process is still 10.

  6. Anonymous users2024-02-05

    7. A and B (I have been looking at them for a long time and found that these two answers are exactly the same).

    8、c9、a

    10、d

  7. Anonymous users2024-02-04

    Answer to this question: a

    xa and a=b is a logical expression, and the value of the logical expression can only be true or false, because x=2, y=5, so x

Related questions
4 answers2024-05-10

If you have a book, just buy one yourself, and before each second-level exam, there are exam questions to refer to, 100% of which are inside, and there are many questions.

7 answers2024-05-10

Borrowing: Borrowing: Bank Deposits 30 000 Counting the increase in assets. >>>More

17 answers2024-05-10

The anode produces oxygen and the cathode produces hydrogen). >>>More

14 answers2024-05-10

Even oo', then boo' is a regular triangle, and aoo' is a right-angled triangle with three sides, and the area of the quadrilateral ao'bo is 4 3+6. Similarly, turn OC 60 degrees clockwise, and then connect AO'' to get a side length of 5 regular triangles and right triangles, with an area of (25 roots, numbers, 3) 4+6, and the same AO turns 60 degrees to obtain quadrilaterals (9 roots, numbers, 3) 4+6 >>>More

5 answers2024-05-10

Substituting the point q(0,-3) into the parabola y=x 2+bx+c, we get c=-3, and let a(x1,0) and b(x2,0). >>>More