Do While Loop
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int pilihan, a, b;
do{
a = sc.nextInt();
b = sc.nextInt();
pilihan = sc.nextInt();
if(pilihan==1){
System.out.println(a-b);
}
else if(pilihan==2){
System.out.println(a+b);
}
}while(pilihan==1||pilihan==2);
}