package com.Bruno;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner reader = new Scanner(System.in);
System.out.print("How Many:");
int numberOne = Integer.parseInt(reader.nextLine());
while ((numberOne >=0) && (numberOne <=7)) {
System.out.print(printText() + "\n" );
numberOne--;
}
public static void printText() {
System.out.println("In the beginning there were the swamp, the hoe and Java." + "/n");
}
}
}
答案 0 :(得分:1)
代码:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner reader = new Scanner(System.in);
System.out.print("How Many:");
int numberOne = Integer.parseInt(reader.nextLine());
while ((numberOne >= 0) && (numberOne <= 7)) {
System.out.print("" + printText() + "\n");
numberOne--;
}
}
public static String printText() {
return "In the beginning there were the swamp, the hoe and Java." + "/n";
}
}