×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: aa aa
Added: Dec 9, 2021 7:52 AM
Modified: Dec 9, 2021 10:32 AM
Views: 602
Tags: no tags
  1. int a = 0;
  2.            
  3.             while (a < array.length && array[a] != numA){
  4.                 a++;
  5.             }
  6.            
  7.             if (a == array.length) {
  8.                 array[i] = numA;
  9.             }else{
  10.                 i--;
  11.             }