Thursday, August 8, 2013

Java Program To Print Stars In Right Angled Triangle

public class RightAngledTriangle {
public static void main(String args[]) {
for (int i = 0; i <= 5; i++) {
for (int j = 0; j <= i; j++) {
System.out.print(" * ");
}
System.out.println(" ");
}
}
}






3 comments:

  1. Really Nice Post to Print Star Pattern in Java Yesterday I visit this blog and i was found lots of helpful information from your side thanks for sharing updated and New Technology related Post.

    ReplyDelete
  2. If we use of this code....than our output will display like as a straight line vertically....what should i do to change in this code...plz tell me ..

    ReplyDelete