开发者

Calculator working, but its not showing numbers seperated

开发者 https://www.devze.com 2023-03-19 01:51 出处:网络
this is my first time really programming anything advanced(for me :P) All i made was a program to launch diffrent programs ^^.

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 Wint开发者_开发技巧ermaul. 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


Try:

RichTextBox1.Text = RichTextBox1.Text & Splitanwser(0) + Environment.NewLine
0

精彩评论

暂无评论...
验证码 换一张
取 消