+0  
 
0
428
3
avatar

Find all natural numbers, which when divided by 7, leave the same number for the quotient and the remainder.

 Feb 27, 2021
 #1
avatar
0

a=1; c=int(a / 7); b=a%7;if(c==b, goto4, goto5);printa,c,b; a++;if(a<1000, goto1, 0)

 

n    q    r,   where n=Number, q =Quotient, r = Remainder.

8    1    1
16  2   2
24  3   3
32  4   4
40  5   5
48  6   6
 

 Feb 27, 2021
 #2
avatar+33603 
+3

Think of it like this:

 

(1*7 + 1)/7           8

 

(2*7 + 2)/7          16

 

(3*7 + 3)/7          24

 

(4*7 + 4)/7          32

 

(5*7 + 5)/7          40

 

(6*7 + 6)/7          48

 Feb 27, 2021

1 Online Users

avatar