+0  
 
0
76
1
avatar

Let be a positive integer, and define the integers \(n=x^2+2x+17\) and \(d=2x+5\) . When dividing \(n\) by \(d\) , the quotient is \(x\) , and the remainder is \(7\) . Find \(x\) .

 Oct 22, 2019
 #1
avatar
+1

x=0;n=x^2+2*x+17;d=2*x+5;if(int(n/d)==x and n%d==7, goto loop, goto next);loop:printx,n,d;next:x++;if(x<100, goto1, discard=0;


x          n         d
2         25        9

 Oct 22, 2019
edited by Guest  Oct 22, 2019
edited by Guest  Oct 22, 2019

10 Online Users

avatar