import java.util.Scanner;
public class Mohamed {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
test: {
if (5 < 6) {
break test;
}
System.out.println("1");
System.out.println("2");
System.out.println("3");
System.out.println("4");
}
System.out.println("5");
}
}
import java.util.Scanner;
public class Mohamed {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
for (int row = 1; row <= 10; row++) {
for (int column = 1; column <= 5; column++) {
System.out.print("* ");
}
System.out.println("");
}
}
}
import java.util.Scanner;
public class Mohamed {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
stop: {
for (int row = 1; row <= 10; row++) {
for (int column = 1; column <= 5; column++) {
if (row == 5) {
break stop;
}
System.out.print("* ");
}
System.out.println("");
}
}
}
}
public class Mohamed {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
for (int row = 1; row <= 5; row++) {
System.out.println();
for (int column = 1; column <= 10; column++) {
if (column > row) {
continue;
}
System.out.print("* ");
}
}
}
}
import java.util.Scanner;
public class Mohamed {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
nextRow: for (int row = 1; row <= 5; row++) {
System.out.println();
for (int column = 1; column <= 10; column++) {
if (column > row) {
continue nextRow;
}
System.out.print("* ");
}
System.out.println("Ahmed Abdelmoneim");
}
}
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter