diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /662/CH9/EX9.2/example9_2.sci | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '662/CH9/EX9.2/example9_2.sci')
-rwxr-xr-x | 662/CH9/EX9.2/example9_2.sci | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/662/CH9/EX9.2/example9_2.sci b/662/CH9/EX9.2/example9_2.sci new file mode 100755 index 000000000..9ccb935cf --- /dev/null +++ b/662/CH9/EX9.2/example9_2.sci @@ -0,0 +1,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();
\ No newline at end of file |