| Author |
Printing a triangle
|
Vivek Alampally
Ranch Hand
Joined: Jul 10, 2008
Posts: 65
|
|
I am trying to a write a program which prints a triangle as shown below
*
**
***
****
*****
Can anybody tell me how to do it in java?
|
 |
Maneesh Godbole
Saloon Keeper
Joined: Jul 26, 2007
Posts: 7602
|
|
If you are looking for a ready made solution, you are at the wrong place.
Show us what you have got so far, tell us where you are stuck and we will help point you in the right direction
|
[Donate a pint, save a life!] [How to ask questions]
|
 |
Henry Wong
author
Sheriff
Joined: Sep 28, 2004
Posts: 14606
|
|
Generally, starting with what you just learned is a good idea. I am assuming that you just learned about loops prior to this homework assignment. Start from there...
Henry
|
Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
|
 |
Pushkar Choudhary
Rancher
Joined: May 21, 2006
Posts: 416
|
|
Vivek Alampally wrote:Can anybody tell me how to do it in java?
In case you are not sure why Maneesh is saying:
Maneesh Godbole wrote:If you are looking for a ready made solution, you are at the wrong place.
read this and this.
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 26710
|
|
People have said enough about not giving solutions, I think.
Vivek Alampally, how far have you got?
|
 |
Vivek Alampally
Ranch Hand
Joined: Jul 10, 2008
Posts: 65
|
|
Actually I wanted to print a different triangle(Here at the time of posting, forum editor is eliminating all the spaces) . But it is not possible here to show you all what I actually wanted to print
|
 |
Misha Ver
Ranch Hand
Joined: Mar 03, 2008
Posts: 470
|
|
You could use http://faq.javaranch.com/java/UseCodeTags
|
 |
 |
|
|
subject: Printing a triangle
|
|
|