Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 398 Weeks Ago, 3 Days Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Computer Science Posted 16 Sep 2017 My Price 9.00

Repeated subtraction procedure

1.Division Given two numbers a and b, print the quotient and remainder of a/b. Use the Repeated subtraction procedure taught in class.

Input

The first line will contain a number t. The next t lines contain two numbers a and b.

Output

For each test case, print the value of a after each iteration. Print one more line at the end with the quotient and remainder seperated by spaces.

Sample Input

2
53 5
36 8

Sample Output

48
43
38
33
28
23
18
13
8
3
10 3
28
20
12
4
4 4

Constraints

0=a,b=100000000(10^8)
2.
Fast Multiplication Given two numbers a and b, find their product using the more efficient multiplication algorithm taught in the class. Also, print the value of a everytime it's added to the answer.
There are several test cases.
The number of lines output for a test case depends on the value of b.
Leave a blank line after the output for each test case.

Input

The first line contains T, the number of test cases.
Each test case contains a line with the two integers, a and b.

Constraints

It is guaranteed that all numbers in the output will fit in a 32-bit signed integer
-10^8 = a = 10^8
0 = b = 10^8
1=T=10

Sample Input

2
7 9
11 15

Sample Output

adding 7
adding 56
63
adding 11
adding 22
adding 44
adding 88
165

Answers

(5)
Status NEW Posted 16 Sep 2017 01:09 PM My Price 9.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll

Not Rated(0)