Hey - check number 2 is not solved, can someone help me understand why?
package en.codegym.task.pro.task04.task0414;
import java.util.Scanner;
/*
There's never too much of a good thing
*/
public class Solution {
public static void main(String[] args) {
//write your code here
Scanner scanner = new Scanner(System.in);
String s;
int number;
do {
s = scanner.next();
number = scanner.nextInt();
if(number <= 0 || number >= 5) {
System.out.println(s);
}
else {
for(int i = 0; i < number; i++) {
System.out.println(s);
}
}
}
while(scanner.hasNext());
}
}
package en.codegym.task.pro.task04.task0414;
import java.util.Scanner;
/*
There's never too much of a good thing
*/
public class Solution {
public static void main(String[] args) {
//write your code here
Scanner scanner = new Scanner(System.in);
String s;
int number;
do {
s = scanner.next();
number = scanner.nextInt();
if(number <= 0 || number >= 5) {
System.out.println(s);
}
else {
for(int i = 0; i < number; i++) {
System.out.println(s);
}
}
}
while(scanner.hasNext());
}
}