Suppose I want to find both one number divided by another and the remainder of this, like so:
[CODE]int x = 50, y = 7;
int a = x / y,
b = x % y;[/CODE]This seems like an efficient way of doing things because the same calculation is being carried out twice. Does anyone know a trick for only having to do the calculation once and thereby saving processing time?
Thanks in advance,