How do I format the numbers so that they are subscripts? I get an output of X1Y1 + X2Y2 +
, but ideally I would like it to be X1Y1 + X2Y2 +
so that it is easier to read.
Code:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim n, i, count As Integer
Dim string2 As String = ""
Dim string3 As String = ""
i = 1
n = 10
For count = i To n - 1
string2 &= "X" & count.ToString & "Y" & count.ToString & " + "
Next
string3 &= "X" & n.ToString & "Y" & n.ToString
lbl_ans.Text &= string2 & string3
End Sub
End Class