Hi my friends,
I think the solution is correct, but I don't know where is the problem at the if / else command.
Many thanks for a short hint.
Rainer
package de.codegym.task.task04.task0410;
/*
Komm schon, Glückssieben!
*/
public class Solution {
public static void main(String[] args) {
intervallPruefen(60);
intervallPruefen(112);
intervallPruefen(10);
}
public static void intervallPruefen(int a) {
if (a <= 50 && a >= 100);
{
System.out.println("Die Zahl " + a + " liegt im Intervall.");
}
else
{
System.out.println("Die Zahl " + a + " liegt nicht im Intervall.");
}
}
}