SHARE
TWEET

Untitled

a guest Jun 26th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. static void PrintF(int[] MyNumbers, int[] OtherNumbers) {
  2.   System.out.println("");
  3.   System.out.println("The first array's numbers are "+(Arrays.toString(MyNumbers))+" and the second array's numbers are "+(Arrays.toString(OtherNumbers))+".");
  4.  
  5.      for(int i = 0; i < MyNumbers.length; i++) {
  6.             for(int j = 0; j < OtherNumbers.length; j++) {
  7.                 if(MyNumbers[i] == OtherNumbers[j]) {
  8.                     System.out.println(MyNumbers[i]);
  9.                 }
  10.                 else {
  11.                   System.out.print("There are no common intergers between MyNumbers and OtherNumbers.");
  12.             }
  13.         }
  14.    }
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top