zweiter commit
parent
8dad2172b2
commit
eda1f578a9
|
@ -0,0 +1,24 @@
|
|||
package Uebung4;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
public class Uebung4bRechteck {
|
||||
|
||||
public static void main(String[] args) {
|
||||
Scanner scanner = new Scanner(System.in);
|
||||
System.out.println("Geben Sie die Höhe an?");
|
||||
int hoehe = scanner.nextInt();
|
||||
System.out.println("Geben Sie die Breite an?");
|
||||
int breite = scanner.nextInt();
|
||||
System.out.println("Abmessungen:"+ hoehe + "x" +breite);
|
||||
for (int i = 0; i < hoehe; i++) {
|
||||
for (int j = 0; j < breite; j++) {
|
||||
System.out.print("#");
|
||||
|
||||
}
|
||||
System.out.println();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue