#include "stdio.h"
INT binarysearch (const Int a [], int key, int N)
{
Int low, mid, high;
Low = 0;
HIGH = N - 1;
While (low <= high)
{
MID = (low high) / 2;
IF (a [MID]
Low = MID 1;
Else IF (a [MID]> Key)
HIGH = MID - 1;
Else
Return MID;
}
Return -1;
//test:
Int main () {
INT A [] = {-2, -4, 0, 5, 11, 13};
Printf ("BinarySearch:% D / N", BinarySearch (A, 13, SIZE));
Return 0;
}