package basics;public class Stars {public static void main(String[] args) {for(int i=1;i<=5;i++){
for(int j=1;j<=i;j++){System.out.print("*");}System.out.println("");}}}
Output for the above Code:
*
**
***
****
*****
Tags: Java,Printing Stars,Right triangle
No comments:
Post a Comment