usestarcodebaconrbx
usestarcodebaconrbx usestarcodebaconrbx
  • 15-03-2020
  • Mathematics
contestada

How can you actually divide numbers without subtraction?

Respuesta :

farchinsung10
farchinsung10 farchinsung10
  • 15-03-2020

#include <stdio.h> #include <stdlib.h>

// Function to perform division (x / y) of two numbers x and y. // without using division operator in the code. int divide(int x, int y)

{ // handle divisibility by 0. if (y == 0)

{ printf("Error!! Divisible by 0"); exit(1);

} // store sign of the result.

int sign = 1; if (x * y < 0)

Answer Link

Otras preguntas

solve for x 5(x+1)=5x+2
In the inspirational 1946 film, It's a Wonderful Life, what's the name of George Bailey's guardian angel
Ms.enigma said, "five less than one third of my age is 14." How old is ms. Enigma?
Each paper clip is 3/4 of an inch long and costs $.02. Exactly enough paper clips are laid end to end to have a total length of 36 inches. What is the total co
Each statement is true of the Enlightenment EXCEPT: A. It sought to justify the divine right of kings. B. It influenced the American Founding Fathers. C. It beg
What was Rudolph's punishment for his red nose?
why did president taft fire gifford pinchot for insubordination?
The phrase "establish justice" in the Preamble can be linked to the Fifth Amendment guarantee of due process. How did the Constitution establish justice in the
what does the idiom "a penny is a lot of money if you haven't got a penny" mean
The Hebrew nation was split into two parts: _____. Judah and Tyre Israel and Judah Israel and Sinai