summaryrefslogtreecommitdiff
path: root/1034/CH7/EX7.3/7s3.sce
diff options
context:
space:
mode:
Diffstat (limited to '1034/CH7/EX7.3/7s3.sce')
-rwxr-xr-x1034/CH7/EX7.3/7s3.sce17
1 files changed, 17 insertions, 0 deletions
diff --git a/1034/CH7/EX7.3/7s3.sce b/1034/CH7/EX7.3/7s3.sce
new file mode 100755
index 000000000..df0e95f3f
--- /dev/null
+++ b/1034/CH7/EX7.3/7s3.sce
@@ -0,0 +1,17 @@
+clear;
+clc;
+disp("Example 7.3");
+funcprot(0);
+function[a1]=quick(a);
+ a=gsort(a);//IN BUILT QUICK SORT FUNCTION
+ n=length(a);
+ a1=[];
+ for i=1:n
+ a1=[a1(:,:) a(n+1-i)];
+ end
+ disp(a1,"Sorted array is:");
+endfunction
+//Calling Routine:
+a=[26 5 37 1 61 11 59 15 48 19]
+disp(a,"Given Array");
+a1=quick(a) \ No newline at end of file