Four VB programming problems, solving, solving several VB problems

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

    There doesn't seem to be a strdup function in VB, so you need to define it yourself.

    function strdup(x, y)for i = 1 to x

    strdup = strdup & y

    next i

    end function

    Question 1. private sub command1_click()for i = 1 to 5

    print strdup(i, "*")

    next i

    end sub

    Question 2. private sub command2_click()for i = 1 to 5

    next i

    end sub

    Question 3. private sub command3_click()for i = 5 to 1 step -1next i

    end sub

    Question 4. private sub command4_click()for i = 5 to 1 step -1print strdup(i, "*")

    next i

    end sub

  2. Anonymous users2024-02-09

    for i=1 to 5:print string(i,"*"):next

    The fourth is the first in turn, and the third thinks to himself, there is no VB test for hand fighting, and I don't know how to ask again.

  3. Anonymous users2024-02-08

    1.Yang Liu planted 2 trees on Arbor Day in 2012, and he plans to plant trees every year, and every year is 1 times more than the previous year.

    Hold until you plant at least 100 trees yourself. Please write a program to calculate the year in which you can complete the plan.

    According to the title 2 7 = 128, that is to say, the maximum age is 7 years, according to which the programming is as follows t=2s=2

    for i=2012 to 2012+7

    s=s*2t=t+s

    if t>=100 then

    print "to" & i & "years to complete the plan, a total of trees planted" & t & "trees"

    exit for

    end if

    next i

    2.The program asks to find a number where the sum of the tens and single digits is 10, then the answer is 19 46 823The procedure for the place of the vacant seat is.

    money = 35 * n

  4. Anonymous users2024-02-07

    The first question action is the meaning of 2 when the file is saved, so choose B

    The second question doesn't seem to have the attribute name, b

    Question 3: Select A

Related questions
4 answers2024-05-12

There are two ways to do this, first: with a triple cycle; Second, just write a function call. I'll do it for you here with the second one, first making a method that returns the value of each item: >>>More

6 answers2024-05-12

Good question, write with a for loop and judgment statement. >>>More

3 answers2024-05-12

1. Solve all: Question 11 of the first picture.

1) Select C, event name. >>>More

5 answers2024-05-12

Answer: Let f(t)=t(1-2t)(1-3t) t [0,1].

It is advisable to let f(t)=t(1-2t)(1-3t) a(3t-1) be established in [0,1] constantly, and determine a first >>>More

18 answers2024-05-12

1 The equation for one axis of symmetry for the image of the function y=sin(2x+5 2 ) is ( >>>More