|
@@ -0,0 +1,33 @@
|
|
|
|
|
+ import java.util.Scanner;
|
|
|
|
|
+
|
|
|
|
|
+ public class InputOutput {
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ public static void main(String args[]) {
|
|
|
|
|
+
|
|
|
|
|
+ int x = 0;
|
|
|
|
|
+ String text = "";
|
|
|
|
|
+ Scanner scanner = new Scanner(System.in);
|
|
|
|
|
+
|
|
|
|
|
+ while ( x < 1 ) {
|
|
|
|
|
+
|
|
|
|
|
+ System.out.println("Bitte gib eine positive Zahl ein: ");
|
|
|
|
|
+ text = scanner.nextLine();
|
|
|
|
|
+ x = Integer.parseInt(text);
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ System.out.println("Bitte gib einen Text ein:");
|
|
|
|
|
+ text = scanner.nextLine();
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ for (int i = 0; i < x; i++) {
|
|
|
|
|
+ System.out.println(text);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+}
|