diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /48/CH2/EX2.11/eg_2_11.sce | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '48/CH2/EX2.11/eg_2_11.sce')
-rwxr-xr-x | 48/CH2/EX2.11/eg_2_11.sce | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/48/CH2/EX2.11/eg_2_11.sce b/48/CH2/EX2.11/eg_2_11.sce new file mode 100755 index 000000000..520598f91 --- /dev/null +++ b/48/CH2/EX2.11/eg_2_11.sce @@ -0,0 +1,23 @@ +clear;
+clc;
+//N=input("enter the number for which divisibilty ");
+N=45; //divident
+h=1;
+for i=1:N //finding all the divisors of 45
+ if(modulo(N,i)==0)
+ r(h)=i;
+ h=h+1;
+ end
+end
+n=max(size(r));
+disp("Hasse Diagram") //displaying in the form of hasse diagram
+disp("------------")
+disp(r(n));
+h=2;
+for i=n-1:-2:3
+ disp("-----------");
+ disp(r(i),r(i-1));
+ h=h+1;
+end
+disp("----------")
+disp(r(1));
|