summaryrefslogtreecommitdiff
path: root/1034/CH3/EX3.1
diff options
context:
space:
mode:
Diffstat (limited to '1034/CH3/EX3.1')
-rwxr-xr-x1034/CH3/EX3.1/example1.sce11
1 files changed, 11 insertions, 0 deletions
diff --git a/1034/CH3/EX3.1/example1.sce b/1034/CH3/EX3.1/example1.sce
new file mode 100755
index 000000000..e30bec680
--- /dev/null
+++ b/1034/CH3/EX3.1/example1.sce
@@ -0,0 +1,11 @@
+clear;
+clc;
+printf("\nexample 3.1\n");
+//stacks follow LIFO i.e last in first out. so printing out array from last to first will be same as stack.
+a=[12;35;16;48;29;17;13]
+i=7;
+printf("\tstack =");
+while i>0
+ printf("\n\t%d",a(i));
+ i=i-1;
+end