diff options
Diffstat (limited to '911/CH2/EX2.13/ex_2_13.sce')
-rw-r--r-- | 911/CH2/EX2.13/ex_2_13.sce | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/911/CH2/EX2.13/ex_2_13.sce b/911/CH2/EX2.13/ex_2_13.sce new file mode 100644 index 000000000..494084fa5 --- /dev/null +++ b/911/CH2/EX2.13/ex_2_13.sce @@ -0,0 +1,15 @@ +// example 2.13//
+//octal subtracttion//
+clc
+//clears the screen//
+clear
+//clears all existing variables//
+a=oct2dec('17');
+//given numbers//
+b=oct2dec('21');
+c=b-a;
+d=dec2bin(c,8)
+e=dec2oct(c)
+disp(c,'subtraction of given numbers in decimal form = ')
+disp(d,'subtraction of given numbers in binary form = ')
+disp(e,'subtraction of given numbers in octal form = ')
\ No newline at end of file |