summaryrefslogtreecommitdiff
path: root/659/CH10/EX10.2
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /659/CH10/EX10.2
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 '659/CH10/EX10.2')
-rwxr-xr-x659/CH10/EX10.2/exm10_2.sci18
-rwxr-xr-x659/CH10/EX10.2/exm10_2_output.PNGbin0 -> 5707 bytes
2 files changed, 18 insertions, 0 deletions
diff --git a/659/CH10/EX10.2/exm10_2.sci b/659/CH10/EX10.2/exm10_2.sci
new file mode 100755
index 000000000..8c1486842
--- /dev/null
+++ b/659/CH10/EX10.2/exm10_2.sci
@@ -0,0 +1,18 @@
+// Example 10.2
+// Write a program to illustrate the comparison of structure variables.
+
+function []=class()
+ //Defining structures
+ student1=struct('number',111,'name','Rao','marks',72.50);
+ student2=struct('number',222,'name','Raddy','marks',67.00);
+ student3=struct('number',[],'name',[],'marks',[]);
+ student3=student2;
+ if(student3==student2) , //Logical operation on structures
+ disp("Student2 and student 3 are same");
+ printf(" %d %s %f",student3.number,student3.name,student3.marks);
+ else
+ disp("Student2 and student 3 are not same");
+ end
+endfunction
+//calling function class
+class() \ No newline at end of file
diff --git a/659/CH10/EX10.2/exm10_2_output.PNG b/659/CH10/EX10.2/exm10_2_output.PNG
new file mode 100755
index 000000000..470ac181e
--- /dev/null
+++ b/659/CH10/EX10.2/exm10_2_output.PNG
Binary files differ