Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class belajarMenembak {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int n = scanner.nextInt();
- char[] array = {'x','x','x','x','x'};
- for (int i = 0; i < n; i++) {
- int temp = scanner.next().charAt(1);
- temp-='1';
- array[temp]='o';
- }
- for (int i = 0; i < array.length; i++) {
- if (i==0) System.out.print("| ");
- System.out.print(array[i]+" ");
- if (i==array.length-1) System.out.println("|");
- }
- System.out.println("-------------\n- LAPANGAN A -");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement