Can someone help me po fix my code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can someone help me po fix my code

Design and create a java program using the looping statement that will perform the following: 1. Accept an integer value. 2. Display a pattern based on the given integer value. Example: Enter an integer value: 5 512345 552345 555345 555545 555555 Ito po yung nagawa ko, yung problema ko po is hindi ko sila mapagdugtong, nasa baba yung 12345 huhu package act14.java; import java.util.Scanner; public class act14 { public static void main(String[]args) { Scanner sc = new Scanner(System.in); System.out.print("Enter a number = "); int num = sc.nextInt(); for(int e = 1; e <= num; e++){ for(int j = 1; j <= e; j++){ System.out.print(num); } System.out.println(); } for (int e = 1; e <= num; e++){ for (int j = 1; j <= num; j++){ if (e <= j) { System.out.print(j); } else { System.out.print(" "); } } System.out.println() ; } } }

10th Nov 2022, 8:52 AM
Eleana Rose Laguna
Eleana Rose Laguna - avatar
2 Answers
+ 1
Thankyouu poo
10th Nov 2022, 3:28 PM
Eleana Rose Laguna
Eleana Rose Laguna - avatar