I want the numbers in the first array that do not repeat with the numbers in the second array to go to the third array
This is what I have done till now and it doesn`t work...please help
for(int i = 0; i < isir.length; i++)
{
for(int j = 0 ; j < isir2.length; j++)
{
if(isir[i] != isir[j])
{
for(int k = 0; k < sirdif1.length; k++)
{
sirdif1[k] = isir[i];
}
}
}
}
I am entering the numbers from console with Scanner function...
Aucun commentaire:
Enregistrer un commentaire