Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Problem4_Triangleof55stars
- {
- public static void main(String[] args)
- { //начин 1
- //System.out.println("*");
- //System.out.println("**");
- //System.out.println("***");
- //System.out.println("****");
- //System.out.println("*****");
- //System.out.println("******");
- //System.out.println("*******");
- // System.out.println("********");
- //System.out.println("*********");
- // System.out.println("**********");
- //начин 2
- int count = 10;
- int l = 1;
- while(l <= count)
- {
- for(int x = 1; x <= l; x++)
- {
- System.out.print("*");
- }
- System.out.print("\n");
- l++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement