summaryrefslogtreecommitdiff
path: root/1034/CH8/EX8.2/8s2.sce
blob: 56da93138d7e45f244465584a0a6386861303c6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
clear;
clc;
disp("Example 8.2");
function[]=stringtoint()
    num= ascii("scilab");
    disp("displayin ascii codes of alphabets=");
    disp(num);
    // converting strings into unique non-negative integer and suming these unique integers.
    z=sum(num);
    disp("displayin sum of these integers");
    disp(z);
endfunction
stringtoint()