Created
September 9, 2020 03:08
-
-
Save Zelakolase/4b8e7604dd2361ef5318501e72cdbcad to your computer and use it in GitHub Desktop.
How to غش Legally in the Math Class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.Map.Entry; | |
public class FOR_MR_AMR { | |
public static void main(String[] args) { | |
// X x Y = ? | |
int[] X = {1,2,3}; | |
int[] Y = {4}; | |
Map<Integer,Integer> RES = new HashMap<Integer,Integer>(); | |
for(int i = 0;i<X.length;i++) { | |
for (int ii = 0;ii<Y.length;ii++) { | |
RES.put(X[i],Y[ii]); | |
} | |
} | |
System.out.print("{"); | |
for (Entry<Integer, Integer> set : RES.entrySet()) { | |
System.out.print("("+set.getKey()+","+set.getValue()+")"); | |
} | |
System.out.print("}"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OUTPUT : { (1,4) (2,4) (3,4) }