summaryrefslogtreecommitdiff
path: root/662/CH9/EX9.2/example9_2.sci
blob: 9ccb935cfab681504dff3a953265c9c493014e15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
                //Programming Example 9.2
            //Lowercase to Upercase converson using 1 dimensional array
function[]  = main() 
    //read in the line
    line =input("Enter a line: ","string");
    SIZE= length(line);
    for count = 1:1:SIZE
        letter(count) = part(line, count);
    end
    //display the line in upper case
    for count = 1:1:SIZE
        a=convstr(letter(count),'u');
        printf("%c",a);
    end
endfunction

//calling main()
funcprot(0);
main();