hi! i need help by creating a program that will divide using loops wihout using any division or multiplication sign. the allowed signs are just addition and subtraction. Thank you! i will post my program if someone replies with this.

franmaez_0716
0
Newbie Poster

## Recommended Answers

Jump to PostYou are expected to post the code in the first post, but well.

The algo is pretty simple here - remember those multiplication lessons back in elementary school? For a*b you just make a+a addition b times. Similar with division.

Jump to PostFor integer division, a/b, you subtract b from a, as along as a>b, counting how many times you did that. The rest is a remainder (a mod b)

## All 6 Replies

jaskij
45
Junior Poster in Training

franmaez_0716
0
Newbie Poster

jaskij
45
Junior Poster in Training

franmaez_0716
0
Newbie Poster

Lerner
582
Nearly a Posting Maven

franmaez_0716
0
Newbie Poster

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.