summaryrefslogtreecommitdiff
path: root/662/CH9/EX9.2/example9_2.sci
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /662/CH9/EX9.2/example9_2.sci
downloadScilab-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-x662/CH9/EX9.2/example9_2.sci19
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