summaryrefslogtreecommitdiff
path: root/662/CH10/EX10.4
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /662/CH10/EX10.4
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/CH10/EX10.4')
-rwxr-xr-x662/CH10/EX10.4/Example10_4.jpgbin0 -> 19475 bytes
-rwxr-xr-x662/CH10/EX10.4/Example10_4.sci15
2 files changed, 15 insertions, 0 deletions
diff --git a/662/CH10/EX10.4/Example10_4.jpg b/662/CH10/EX10.4/Example10_4.jpg
new file mode 100755
index 000000000..e533af7a0
--- /dev/null
+++ b/662/CH10/EX10.4/Example10_4.jpg
Binary files differ
diff --git a/662/CH10/EX10.4/Example10_4.sci b/662/CH10/EX10.4/Example10_4.sci
new file mode 100755
index 000000000..c95fb96b9
--- /dev/null
+++ b/662/CH10/EX10.4/Example10_4.sci
@@ -0,0 +1,15 @@
+ //Example 10.4
+//Read a line of text from keyboard and display the same on screen
+global MAX_SIZE;
+MAX_SIZE = 50;
+
+function[] = main()
+ printf("Enter a line of text of maximum %d characters: ", MAX_SIZE);
+ str = read(%io(1), 1, 1, '(a)');
+ printf("The entered line is:\n");
+ write(%io(2),str);
+endfunction
+
+//Calling main()
+funcprot(0);
+main(); \ No newline at end of file