Reputation:
this is my first time really programming anything advanced(for me :P) All i made was a program to launch diffrent programs ^^.
This is what I am currencly workin on: A calculator to calculate waves for example Wintermaul. I have writen this code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = IsNumeric(0) = False Then
TextBox1.Text = "You fail"
Else
For i As Integer = 1 To TextBox2.Text
Dim Splitanwser() As String = (TextBox1.Text * 1.2 ^ i).ToString.Split(",")
RichTextBox1.Text = RichTextBox1.Text & Splitanwser(0)
Next
End If
End Sub
End Class
As you can see it will calculate the health X 1.2 for each wave. This is working perfectly, but when i calculate: 5 starting health and 5 waves. the answer is 6781012 But it should be:
6
7
8
10
12
How can i make it so it will make more kind of a list in my rich text box?
Thanks in advance!
-Levi
Upvotes: 0
Views: 251
Reputation: 69372
Try:
RichTextBox1.Text = RichTextBox1.Text & Splitanwser(0) + Environment.NewLine
Upvotes: 1