1

0
#include rstdio.ho int male()

Int 1, low, high, mid, n, key, array(100); printf("Enter aber of elements");

scanf("%d",n);

printf("Enter Ed Intagerin", n); for (1-0,1 cm; 1+)

scanf("%d", Barray[1]); printf("Enter value to findn");

scanf("%d", key);

low-0;

high-n-1; mid (lowshigh)/2;

while (low - high) (

16(array[id]<key) low-sid + 1;

else if (array[ald]-key) { printf("%d found at location 3d.n", kry, midel);

break;

else

high-mid-1; mid (low high);

if(low > high)

printf("ut found1 d isn't present in the list.", key); return 0;

In 22. Ce

Post a Comment

0Comments

Please Select Embedded Mode To show the Comment System.*