The next multiple of 10 of any integer

                Never    
n + (10 - n % 10);

/* How this works. The % operator evaluates to the remainder of the division (so 41 % 10 evaluates to 1, while 45 % 10 evaluates to 5). Subtracting that from 10 evaluates to how much how much you need to reach the next multiple. */


/* The only issue is that this will tun 40 into 50. If you don\'t want that, you would need to add a check to make sure it\'s not already a multiple of 10. */

if (n % 10){
    n = n + (10 - n % 10);
}
    

Raw Text