summaryrefslogtreecommitdiff
path: root/659/CH8/EX8.7/exm8_7.sce
diff options
context:
space:
mode:
Diffstat (limited to '659/CH8/EX8.7/exm8_7.sce')
-rwxr-xr-x659/CH8/EX8.7/exm8_7.sce19
1 files changed, 19 insertions, 0 deletions
diff --git a/659/CH8/EX8.7/exm8_7.sce b/659/CH8/EX8.7/exm8_7.sce
new file mode 100755
index 000000000..68bb6f90f
--- /dev/null
+++ b/659/CH8/EX8.7/exm8_7.sce
@@ -0,0 +1,19 @@
+// Example 8.7
+//The name of employees of an organization are stored in three arrays namely-
+//first_name,second_name and last_name.
+//Write a program to concatinate the three parts into one string called name.
+
+
+//Store the name in the three arrays
+first_name=['VISWANATH'];
+second_name=['PRATAP'];
+last_name=['SINGH'];
+
+//Concatinate three parts into one
+name=[first_name second_name last_name];
+// Print the result
+for i=1:3
+ printf("%s ",name(i));
+end
+//Statement below can also be used to print the result
+//disp(name);