Question: I am having a hard time understanding the following code:

```
if ((number % 10)> max) //rem of 10
{
    max = (number % 10);
}
number /= 10;

```

Could you please help me with this?

Answer: 
I guess the code you posted is the body of a loop, like this:

```
int max = 0;
while (number != 0) {
    if (number % 10 > max) {
        max = number % 10;
    }
    number /= 10;
}

```

This loop finds the largest decimal digit of number. E.g. if `number==152`, you will get `max==5` after the loop.
* `(number % 10)`, gives remainder of `number` on dividing by `10`.
* `(number % 10) > max`, means if the remainer is greater than `max`.

So if the remainder is greater than `max`, them make `max` the remainder as:

```
       max = (number % 10); 

```

And `number/=10` is a shorthand of 

```
 number = number/10; //same as number /= 10;

```

which divides `number` by 10, and saves the quotient in `number`.

There are other shorthands in C++ as well:

```
 a += x; // a = a + x;
 a -= x; // a = a - x;
 a *= x; // a = a * x;
 a %= x; // a = a % x; //if a and x are integral type, if they're built-in type.

```

If the type of `a` is class, then you can overload all these operators for your class.