Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- System.out.print("Introduce la altura");
- int alt = sc.nextInt();
- System.out.print("Introduce la anchura");
- int anch = sc.nextInt();
- String aux = "*";
- for (int i = 0; i < alt-1; i++) {
- System.out.println(aux);
- }
- for (int j = 0; j < anch; j++) {
- System.out.print(aux + " ");
- }
- }
Add Comment
Please, Sign In to add comment