summaryrefslogtreecommitdiff
path: root/1553/CH7/EX7.11
diff options
context:
space:
mode:
Diffstat (limited to '1553/CH7/EX7.11')
-rw-r--r--1553/CH7/EX7.11/7Ex11.sce14
1 files changed, 14 insertions, 0 deletions
diff --git a/1553/CH7/EX7.11/7Ex11.sce b/1553/CH7/EX7.11/7Ex11.sce
new file mode 100644
index 000000000..b61655940
--- /dev/null
+++ b/1553/CH7/EX7.11/7Ex11.sce
@@ -0,0 +1,14 @@
+//Chapter 7 Ex11
+
+clc;
+close;
+
+//let tens's digit be x and unit's be x+3
+//given number=10x+(x+3)=11x+3
+//ratio is (11x+3)/(2x+3)=4/1
+//polynomial is: 3x-9=0
+
+ mycoeff=[-9 3];
+p=poly(mycoeff,"x","coeff");
+ans=11*roots(p)+3; //since given number as calculated in line 7
+printf("The number is: %d",ans);