Let\'s say that I need to format the output of an array to display a fixed number of elements per line. How do I go about doing that using modulus operation?
Using C
It gives you the remainder of a division.
int c=11, d=5; cout << (c/d) * d + c % d; // gives you the value of c