blob: ef9fd09c8e3c3f2587d5d5c1849ad5a9200b2605 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
clc;clear;
//Example 25.12
//calculation of product of two octal numbers
//given values
X='15';//divident
Y='24';//divisor
//calculation
x=oct2dec(X);//decimal equivalent
y=oct2dec(Y);//decimal equivalent
z=x*y;
Z=dec2oct(z);//binary equivalent
disp(Z,'product of the given octal numbers is')
|