summaryrefslogtreecommitdiff
path: root/662/CH2/EX2.25
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /662/CH2/EX2.25
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/CH2/EX2.25')
-rwxr-xr-x662/CH2/EX2.25/ex2_25.JPGbin0 -> 21753 bytes
-rwxr-xr-x662/CH2/EX2.25/ex2_25.sce15
2 files changed, 15 insertions, 0 deletions
diff --git a/662/CH2/EX2.25/ex2_25.JPG b/662/CH2/EX2.25/ex2_25.JPG
new file mode 100755
index 000000000..a316ddd32
--- /dev/null
+++ b/662/CH2/EX2.25/ex2_25.JPG
Binary files differ
diff --git a/662/CH2/EX2.25/ex2_25.sce b/662/CH2/EX2.25/ex2_25.sce
new file mode 100755
index 000000000..eac12f1d8
--- /dev/null
+++ b/662/CH2/EX2.25/ex2_25.sce
@@ -0,0 +1,15 @@
+ //Example 2.25
+
+//one dimensional character array
+letter=['c','a','l','i','f','o','r','n','i','a'];
+
+//size displays the size of array as [start index. end index]
+[s,e]=size(letter);
+
+printf("Element Number Subscript Value Array Element Corresponding data Item");
+//in c the subscript start from 0 whereas in scilab from 1...
+for i = s: e
+ l=letter(i);
+ csub=i-1;
+ printf("\n%d \t\t %d \t\t letter[%d] \t\t %c", i , csub, csub, l );
+end