summaryrefslogtreecommitdiff
path: root/662/CH2/EX2.25
diff options
context:
space:
mode:
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