import java.util.*;

public class ListSumChecker {
	public static void main(String[] args) {
		
		// hashset
		Set<Integer> myNumList = new HashSet<Integer>(); // hashSet for actual numbers
		Set<Integer> inversList = new HashSet<Integer>(); // hashSet for invers numbers
		int myInt;
		
		System.out.println("Enter your result to calculate from two Sums of the hashSet: ");
		Scanner scanResult = new Scanner(System.in);		
		int result = scanResult.nextInt();
		
		System.out.println("Enter a valid integer to add to the hashSet");
		Scanner scanList = new Scanner(System.in);
		int nextListInt;
		do {
		scanList = new Scanner(System.in);
		nextListInt = scanList.nextInt();
		myNumList.add(nextListInt);
		} while (scanList.hasNextInt());
		
		
		// the numbers for hashSet; will be sorted for unknown reason
//		myNumList.add(6);
//		myNumList.add(3);
//		myNumList.add(5);
//		myNumList.add(1);
//		myNumList.add(7);
//		myNumList.add(11);
//		myNumList.add(4);
		
		
		System.out.println("The list to check:");
		System.out.println(myNumList + "\n");

		Iterator myIterator = myNumList.iterator();
		while (myIterator.hasNext()) {
			myInt = (Integer) myIterator.next();
			if (inversList.contains(myInt)) {
				System.out.println("Two numbers of the hashSet add up to the reuslt " + result + "\n" + 
				"Your two numbers are: " + myInt + " and " + (result - myInt) + ".");
				return;
			} else {
				inversList.add(result - myInt);	
			}
					
		}
		System.out.println("None of these numbers add up to " + result +".");
		
		
		
	}

}

@@ -93,21 +93,8 @@
 %0A%09%09%0A
-%09%09// hashset%0A
 %09%09Se
@@ -252,16 +252,19 @@
 numbers%0A
+%09%09%0A
 %09%09int my
@@ -357,16 +357,18 @@
 Set: %22);
+%09%09
 %0A%09%09Scann
@@ -485,17 +485,17 @@
 a valid 
-i
+I
 nteger t
@@ -525,49 +525,64 @@
 %0A%09%09S
-canner scanList = new Scanner(System.in);
+ystem.out.println(%22(Hint: add '0' to stop scaning)%22);%0A%09%09
 %0A%09%09i
@@ -606,16 +606,24 @@
 %09do %7B%0A%09%09
+Scanner 
 scanList
@@ -730,259 +730,72 @@
 le (
-scanList.hasNextInt());%0A%09%09%0A%09%09%0A%09%09// the numbers for hashSet; will be sorted for unknown reason%0A//%09%09myNumList.add(6);%0A//%09%09myNumList.add(3);%0A//%09%09myNumList.add(5);%0A//%09%09myNumList.add(1);%0A//%09%09myNumList.add(7);%0A//%09%09myNumList.add(11);%0A//%09%09myNumList.add(4);%0A%09%09
+0 %3C nextListInt && nextListInt %3C 99 );%0A%09%09%0A%09%09myNumList.remove(0);
 %0A%09%09%0A
@@ -1106,10 +1106,10 @@
 e re
-u
 s
+u
 lt %22
@@ -1137,12 +1137,11 @@
 %09%09%09%22
-Your
+The
  two
@@ -1157,22 +1157,33 @@
 are: %22 +
+ (result -
  myInt
+)
  + %22 and
@@ -1186,33 +1186,22 @@
  and %22 +
- (result -
  myInt
-)
  + %22.%22);

add own Values to the hashSet