can someone give me an example that draws right triangle using asterisk using do-while loop only (without using for loop)

Recommended Answers

All 2 Replies

Think about it this way.
You are drawing a square....yes a square. The square is devided from corner to corner. HINT You are drawing characters that the user can see and characters that the user can not see. HINT

Next it is as simple as decing how wide/tall you want your triangle to be.

Why are you asking this over and over? Start applying what you've learned and use it.

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.