Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Write a program to output the following pattern, 6 rows total.

I want the code to output:
$
$$
$$$
$$$$
$$$$$
$$$$$$

Thank you for the help!
I'm using Visual Basic
Something like this will do it.

Code
For i As Integer = 0 To 6 - 1
   textBox1.Text += New String("$"c, i + 1) & vbCrLf
Next
(Apr 29, 2020 06:03 PM)xFic Wrote:  Something like this will do it.

Code
For i As Integer = 0 To 6 - 1
   textBox1.Text += New String("$"c, i + 1) & vbCrLf
Next

Write the items to a stringbuilder, then display them in the textbox control
(Apr 30, 2020 11:43 AM)Cairns Wrote:  Write the items to a stringbuilder, then display them in the textbox control

Vouch. The time different between string builder and just adding a string together is literally HUGE in scale.

https://www.youtube.com/watch?v=KNVxcQtLj1Y


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by mantuoluoJun 14, 2021 02:35 PM 2 209 Jun 14, 2021 02:35 PM
Last Post: AeroBlue
[C#] by SicknessAug 16, 2020 10:19 AM 19 409 Aug 16, 2020 10:19 AM
Last Post: Sickness
[Python] by PkgoingoutJul 9, 2019 03:25 PM 0 122 Jul 9, 2019 03:25 PM
Last Post: Pkgoingout