[Solved] Java: Combining the inputs of a while loop
Here is the code together with some comments. import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; //import java.util.Scanner; public class Ingredients { public static void main(String [] args)throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); //or Scanner scan = new Scanner(System.in); int ingredientID=0; int sumOfIngredients=0; System.out.println(“Keep selecting the ingrients that you want until … Read more