Question_6

PHOTO EMBED

Wed Apr 19 2023 14:35:15 GMT+0000 (Coordinated Universal Time)

Saved by @Mohamedshariif #java

---1---
--222--
-33333-
4444444

for(int line = 1; line <=4; line ++)
        {
            for(int j= 1; j<= ( -1 * line +4); j++)
            {
                System.out.print("-");
            }
            for(int k= 1; k<= ( 2* line -1); k++)
            {
                System.out.print(line);
            }
            for(int j= 1; j<= ( -1 * line + 4); j++)
            {
                System.out.print("-");
            }
            System.out.println();
        }
content_copyCOPY