repl.it
@Hariz_Hazril/

10 Dot - Editable Row

Java

No description

fork
loading
Files
  • Main.java
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import java.util.Scanner;
public class Main {
  public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		System.out.println("Berapa bilangan row anda mahu?");
		int row = input.nextInt();
    for(int i=1;i<=row;i++) {
			if(i <= row) {
				for(int j=1;j<=10;j++) {
					System.out.print("* ");
				}
				System.out.println();
			}
		}
  }
}
Fetching token
?