-
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:
public function add(byval n as integer) as double
dim i as integer
dim s as double = 1
for i = 1 to n
s = s * 2 * i - 1)
nextreturn s
end function
Second, you can call the above method in a loop, I wrote it in the form load event, and you didn't input that n, it was directly assigned a value, that is, the maximum value of the following i is 100, I'm really embarrassed, because it is troublesome to add controls to the value again.
dim i as integer
dim s as double
for i = 1 to 100
s = s + add(i)
You can try, I just hope you can solve the problem, nothing else matters, because I'm also a newbie......Hehe.
-
The topic is not clear enough....Not sure what you're asking for....
-
Single selection 2 a, 0 3 b、good 4 .a、pi*2*r6. c、p and q mod 2=0 and y mod 2=0 and z mod 2=0
8. b、word 9.No program 10 、s=1!+2!+3! +10!Multiple choices. c
ba,b,c
ca, b, d judgment.
-
(1) In addition to the form, a total of 3 types of controls are used: text box, button, list box (2), here is to assign the text box Chinese text to the variable s
3) B and C should be chosen, where t is the middle value of the "score" and n is the score of the individual letters. The A position has not been calculated for the score n of a single letter, so it is incorrect. The B position and the C position have been calculated for the score n of a single letter, and the n variable between the B position and the C position has not changed, so both the B position and the C position are OK.
The d position is outside the loop and cannot be added up by the loop, so it is incorrect.
4)stress s->19 t->20 r->18 e->5 s->19 t->19 19+20+18+5+19+19=100
line method.
Draw straight lines and rectangles on objects. >>>More
fuction should be functional
wub should be sub >>>More
Good question, write with a for loop and judgment statement. >>>More
I understand that your problem is not entered in the text control".123213", how to display as"" >>>More
Original content of the textbook:
Reason: At the end of the 15th century, the extensive development of the commodity economy and the continuous expansion of exchange in Western European countries made ** the most important means of payment in commodities**, and ** in Eastern countries became the dream of Western Europeans. >>>More