Environmental Sciences, asked by Anannya7761, 1 month ago

Write a program to subtract two numbers X and y
X=B2A7
Y=7062

Answers

Answered by sanjai15102005
0

Answer:

Input : x = 5, y = 13

Output : 6

Explanation : There are total 6 steps before  

we reach 0:

(5,13) --> (5,8) --> (5,3) --> (2,3)  

--> (2,1) --> (1,1) --> (1,0).

Input : x = 3, y = 5

Output : 4

Explanation : There are 4 steps:

(5,3) --> (2,3) --> (2,1) --> (1,1) --> (1,0)

Input : x = 100, y = 19

Output : 13

Explanation:

Similar questions