summaryrefslogtreecommitdiff
path: root/1553/CH4/EX4.38
diff options
context:
space:
mode:
Diffstat (limited to '1553/CH4/EX4.38')
-rw-r--r--1553/CH4/EX4.38/4Ex38.sce16
1 files changed, 16 insertions, 0 deletions
diff --git a/1553/CH4/EX4.38/4Ex38.sce b/1553/CH4/EX4.38/4Ex38.sce
new file mode 100644
index 000000000..dee0c6545
--- /dev/null
+++ b/1553/CH4/EX4.38/4Ex38.sce
@@ -0,0 +1,16 @@
+//chapter 4 Ex 38
+
+clc;
+clear;
+close;
+x=poly(0,'x');
+AtoS=30; StoA=10;
+y=2*x-(AtoS+2*AtoS); //equation 1
+y=(x+AtoS+StoA)/3; //equation 2
+for x=1:99
+ if 2*x-(AtoS+2*AtoS)==(x+AtoS+StoA)/3
+ break
+ end
+end
+y=(x+AtoS+StoA)/3;
+printf("Arun has Rs.%d and Sajal has Rs.%d",x,y);