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, 4 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 21 Jul 2017 My Price 8.00

one-digit subtraction

Assume we have a “computing agent” that knows how to do one-digit subtraction where the first digit is at least as large as the second (i.e., we do not end up with a negative number).

Thus, our computing agent can do such operations as 7 – 3 = 4, 9 – 1 = 8, and 5 – 5 = 0. It can also subtract a one-digit value from a two-digit value in the range 10–18 as long as the final result has only a single digit. This capability enables it to do such operations as 13 – 7 = 6, 10 – 2 = 8, and 18 – 9 = 9.

Using these primitive capabilities, design an algorithm to do decimal subtraction on two m-digit numbers, where m ≥ 1. You will be given two unsigned whole numbers am-1 am-2. . . a0 and bm-1 bm-2. . . b0. Your algorithm must compute the value cm-1 cm-2. . . c0, the difference of these two values.

am-1 am-2. . . a0

–bm-1 bm-2. . . b0

cm-1 cm-2. . . c0

You may assume that the top number (am-1 am-2 . . . a0) is greater than or equal to the bottom number (bm-1 bm-2. . . b0) so that the result is not a negative value. However, do not assume that each individual digit ai is greater than or equal to bi. If the digit on the bottom is larger than the digit on the top, then you must implement a borrowing scheme to allow the subtraction to continue. (Caution: It may have been easy to learn subtraction as a first grader, but it is devilishly difficult to tell a computer how to do it!)

Answers

(5)
Status NEW Posted 21 Jul 2017 08:07 AM My Price 8.00

Hel-----------lo -----------Sir-----------/Ma-----------dam----------- ----------- -----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------sol-----------uti-----------on.-----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- ca-----------tch-----------

Not Rated(0)