Ich hab ein paar Probleme mit diesem Script, welches ich in eine While-Schleife umbauen möchte:
public class WhileSchleife {
public static void main(String ard[]){
int i = 100, j = 1;
while (i >= j){
i = i - 2; j = j + 3;
System.out.println(i + " - "+ j + " = "+ (i-j));
}
}}
Das Ergebnis ist einmal negativ? Warum?
public class WhileSchleife {
public static void main(String ard[]){
int i = 100, j = 1;
while (i >= j){
i = i - 2; j = j + 3;
System.out.println(i + " - "+ j + " = "+ (i-j));
}
}}
Das Ergebnis ist einmal negativ? Warum?
Zuletzt bearbeitet: