summaryrefslogtreecommitdiff
path: root/1553/CH7/EX7.13
diff options
context:
space:
mode:
Diffstat (limited to '1553/CH7/EX7.13')
-rw-r--r--1553/CH7/EX7.13/7Ex13.sce19
1 files changed, 19 insertions, 0 deletions
diff --git a/1553/CH7/EX7.13/7Ex13.sce b/1553/CH7/EX7.13/7Ex13.sce
new file mode 100644
index 000000000..90a48293f
--- /dev/null
+++ b/1553/CH7/EX7.13/7Ex13.sce
@@ -0,0 +1,19 @@
+//Chapter 7 Ex13
+clc;
+clear;
+close;
+//let fraction be x/y
+
+x=poly(0,'x');
+y=(3*x+1)/2; //equation 1
+y=2*x-1; //equation 2
+for x=1:99
+ if (3*x+1)/2 ==2*x-1
+ mprintf("x=%i \n",x)
+ break
+ end
+end
+disp("substitute the x value in any one of the above equations to find y.");
+y=2*x-1;
+
+printf("\nThe fraction is %d/%d",x,y);