Top "Integer-division" questions

Anything related to the integer division operation, i.e. that special form of division which is performed between two integer numbers and which in math results in a quotient and a remainder.

Check if a number is divisible by 3

I need to find whether a number is divisible by 3 without using %, / or *. The hint given was to use atoi() …

division modulo integer-division
Division between integers in Java

I need to perform division between integers in Java, and the result should be a float. Could I just use / …

java math integer-division
How can I get the quotient and the remainder in a single step?

Possible Duplicate: Divide and Get Remainder at the same time? Is it possible to get both the quotient and the …

c++ c modulo integer-division
Why does GCC use multiplication by a strange number in implementing integer division?

I've been reading about div and mul assembly operations, and I decided to see them in action by writing a …

c gcc assembly x86-64 integer-division
Objective-C Integer Arithmetic

I'm trying to calculate some numbers in an iPhone application. int i = 12; int o = (60 / (i * 50)) * 1000; I would expect o to …

objective-c c math integer-division
How can I use bit shifting to replace integer division?

I understand how to do it for powers of 2 so that's not my question. For example, if I want to …

c++ bit-manipulation integer-division
MATLAB division... should 29/128 return 0?

I really don't think this is a precision problem, the answer should be about 0.226. Here's the exact code: val = I(…

matlab division integer-division
Why I cannot the get percentage by using Int

Please forgive my programming knowledge. I know this is a simple thing, but I do not understand why result is …

c# integer-division
Rounding numbers to the nearest 10 in Postgres

I'm trying to solve this particular problem from PGExercises.com: https://www.pgexercises.com/questions/aggregates/rankmembers.html The gist …

sql postgresql integer window-functions integer-division
Does \ perform integer division in VB?

In VB.NET even if both the operands are integer, the / operator will cause the value to be floating point (…

vb.net division integer-division