diff options
Diffstat (limited to '275/CH8/EX8.8.25/Ch8_8_25.sce')
-rwxr-xr-x | 275/CH8/EX8.8.25/Ch8_8_25.sce | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/275/CH8/EX8.8.25/Ch8_8_25.sce b/275/CH8/EX8.8.25/Ch8_8_25.sce new file mode 100755 index 000000000..8f9a6edb0 --- /dev/null +++ b/275/CH8/EX8.8.25/Ch8_8_25.sce @@ -0,0 +1,14 @@ +clc
+clear
+disp("Example 8.25")
+printf("\n")
+disp("Add the following hexadecimal numbers")
+disp("a)ABC & ABCDE b) DEF & 12EF")
+//this program add only integer part
+a='ABC'
+b='ABCDE'
+a1=hex2dec(a)
+a2=hex2dec(b)
+sum1=a1+a2
+sumhex=dec2hex(sum1)
+printf("%s",sumhex)
\ No newline at end of file |