public class Solution { public static void main(String[] args) { ..............; ..............; // initiate the sum variable to 0. ..............; // create an enter variable used later to compare to the input while (true) { if (..............) { // we don't know if the input is string or int so we have to check that ..............; sum += num; } else { // if the input is not an int , it is a string ( in that scenario ) ..............; if (..............) { // we compare the string input with our previous enter variable , if true , we break break; } } } System.out.println(sum); } }