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 PostTo divide one number by another you could probably pass both numbers, say a and b, to the function with intention of doing a/b. Check if b is zero, because dividing by zero is undefined. Within the function you can declare two numbers, say c and d, with c being …
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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.