blob: 8bcec0e922a07936a29f686d9b1eb2c12e657410 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
//Example 1.4//
//decimal to octal//
clc
//clears the command window//
clear
// clears the variables//
q =0;
b =0;
a= 73.75
// Enter the decimal number//
format ( 'v' ,18)
//increasing the precision to 18
a= floor (a);
h= dec2oct (a);
printf ("The hexadecimal equivalent is = %s" ,h)
|