summaryrefslogtreecommitdiff
path: root/659/CH1/EX1.4/exm1_4.sce
diff options
context:
space:
mode:
Diffstat (limited to '659/CH1/EX1.4/exm1_4.sce')
-rwxr-xr-x659/CH1/EX1.4/exm1_4.sce9
1 files changed, 9 insertions, 0 deletions
diff --git a/659/CH1/EX1.4/exm1_4.sce b/659/CH1/EX1.4/exm1_4.sce
new file mode 100755
index 000000000..ad60696a6
--- /dev/null
+++ b/659/CH1/EX1.4/exm1_4.sce
@@ -0,0 +1,9 @@
+// Example 1.4
+// SAMPLE PROGRAM 2: ADDING TWO NUMBERS
+
+number=100;
+amount=30.75+75.35 ; //Addition of two numbers
+disp(number) ; //Display value of number variable
+//Display value of amount in floating point with five places in all and two places to the right of decimalpoint
+printf("%5.2f",amount);
+