Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function divisao(dividendo, divisor){
- var quociente = 0;
- var resto = 0;
- while(dividendo > 0 && dividendo >= divisor){
- quociente = soma(quociente, 1);
- dividendo = subtrair(dividendo, divisor);
- }
- resto = dividendo;
- return {quociente, resto}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement