Again help...

M

martinmontielr

How can i do a program that makes the numeric center.. this is....


1+2+3+4+5=15 ............ 6= numeric center.... ........7+8= 15.....

of this way 1,2,3,4,5,(6),7,8...


the next is 35 ... (1 a 34) and (36 a 49) the sum of this is: 595
the next program can do that , but it have a mistake and I don`t know
wich is...

While i < n
For i = 1 To numero - 1
sumaA += i
Next
i = numero + 1
While sumaA > sumaB
sumaB += i
i += 1
If sumaA = sumaB Then
TextBox1.Text = TextBox1.Text & numero & vbCrLf

End If
End While


numero += 1
sumaA = 0
sumaB = 0
End While
 
B

Bart Simpson

How can i do a program that makes the numeric center.. this is....


1+2+3+4+5=15 ............ 6= numeric center.... ........7+8= 15.....

of this way 1,2,3,4,5,(6),7,8...


the next is 35 ... (1 a 34) and (36 a 49) the sum of this is: 595
the next program can do that , but it have a mistake and I don`t know
wich is...

While i < n
For i = 1 To numero - 1
sumaA += i
Next
i = numero + 1
While sumaA > sumaB
sumaB += i
i += 1
If sumaA = sumaB Then
TextBox1.Text = TextBox1.Text & numero & vbCrLf

End If
End While


numero += 1
sumaA = 0
sumaB = 0
End While

Wrong language => wrong ng. Thats VB code you posted. Try posting to a
VB (or VB.Net) ng. This is a C++ ng.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,297
Messages
2,571,529
Members
48,242
Latest member
BarbMott55

Latest Threads

Top