system doesn´t end once I enter -1 in the console how can I change that
`´import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader intro = new BufferedReader(new InputStreamReader(System.in));
int a = Integer.parseInt(intro.readLine());
int c = Integer.parseInt(intro.readLine());
int b = Integer.parseInt(intro.readLine());
while(a==-1 || b == -1 | c==-1 ) {
if (a == -1) {
System.out.println(a);
}
else if (c == -1) {
System.out.println(a + c);
}
else if (b == -1){
System.out.println(a + c + b);
// ansonsten geht es endlos weiter
}
break;
//Problem system doesn´t end once I enter -1 in the console how can I change that
}``
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader intro = new BufferedReader(new InputStreamReader(System.in));
int a = Integer.parseInt(intro.readLine());
int c = Integer.parseInt(intro.readLine());
int b = Integer.parseInt(intro.readLine());
while(a==-1 || b == -1 | c==-1 ) {
if (a == -1) {
System.out.println(a);
}
else if (c == -1) {
System.out.println(a + c);
}
else if (b == -1){
System.out.println(a + c + b);
// ansonsten geht es endlos weiter
}
break;
//Problem system doesn´t end once I enter -1 in the console how can I change that
}``