How to product this code as shown below:

If I enter "5" and "10" in the console screen, it display
5 *****
10 **********

Whatever I enter any positive numbers, the screen will display the asterisk partern and depend on the number input.

Please tell me the method using VB code to handle this program.

Recommended Answers

All 2 Replies

Since this sounds like an assignment for class, I will try to point you in the right direction and let you finish things off... let me know if you need more help.

1) You will probably want to use a For...Next loop.
2) You probably want to use the commend Console.Write

Instead of a for next loop, use the new string function. ie.

str = New String(character,number of characters)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.