diff options
Diffstat (limited to '659/CH3/EX3.4/exm3_4.sce')
-rwxr-xr-x | 659/CH3/EX3.4/exm3_4.sce | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/659/CH3/EX3.4/exm3_4.sce b/659/CH3/EX3.4/exm3_4.sce new file mode 100755 index 000000000..1c339326f --- /dev/null +++ b/659/CH3/EX3.4/exm3_4.sce @@ -0,0 +1,16 @@ +// Example 3.4
+//The program illustrates the use of variables in expressions and their evaluation.
+
+a=9;b=12;c=3;
+//Expressions and their evaluations
+x=a-b/3+c*2-1;
+y=a-b/(3+c*(2-1));
+z=a-(b/(3+c)*2)-1;
+
+printf("x=%f\n",x)
+printf("y=%f\n",y)
+printf("z=%f\n",z)
+// disp can be used..
+//disp(x,"x=")
+//disp(y,"y=")
+//disp(z,"z=")
|