2 Replies - 1985 Views - Last Post: 12 August 2010 - 07:31 AM Rate Topic: -----

#1 silvertooth07  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 12-August 10

Insert a new character in a textbox?

Posted 12 August 2010 - 07:13 AM

we were asked to make a program that will accept a letter and how many times will it be shown.

eg: letter: a, number: 5, output: aaaaa

how can i do that? when i run my program, it only shows one 'a'. //assuming i entered a.

thanks!

here's a piece of the program:

Dim counter% = 0
Do
stroutput += strletter
counter += 1
txtletter.Text = stroutput
Loop Until counter < intnum


Is This A Good Question/Topic? 0
  • +

Replies To: Insert a new character in a textbox?

#2 ljfox4  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 67
  • Joined: 10-February 07

Re: Insert a new character in a textbox?

Posted 12 August 2010 - 07:23 AM

The first thing I noticed that looks like the problem is that the line.
Loop Until counter < intnum



should be

Loop Until counter > intnum



Note the less than vs the greater than sign.
Was This Post Helpful? 1
  • +
  • -

#3 silvertooth07  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 12-August 10

Re: Insert a new character in a textbox?

Posted 12 August 2010 - 07:31 AM

my bad. i didn't see that. thanks! that solved the problem!^^
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1