From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 1034/CH7/EX7.8/7s9.sce | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 1034/CH7/EX7.8/7s9.sce (limited to '1034/CH7/EX7.8/7s9.sce') diff --git a/1034/CH7/EX7.8/7s9.sce b/1034/CH7/EX7.8/7s9.sce new file mode 100755 index 000000000..af50bcec5 --- /dev/null +++ b/1034/CH7/EX7.8/7s9.sce @@ -0,0 +1,27 @@ +clear; +clc; +function[]=sortedsearch(a,n,ele) + if(a(1)>ele|a(n)ele) + break; + end + end + end + if(j==0) + disp("%d NOT FOUND",ele); + end + end +endfunction +//Calling Routine: +a=[2 22 23 33 121 222 233]//a should be sorted +disp(a,"Given array"); +sortedsearch(a,7,23) -- cgit