probability of unit digit to be 8 The number $a$ is randomly selected from the set $\left\{0,1,2,3,....,98,99\right\}$.The number $b$ is selected from the same set.What is the probability that the number $3^a+7^b$ has a digit equal to $8$ at the units place?
I found this question on 
What is the probability that the number $3^a+7^b$ has a digit equal to $8$ at the units place?
But could not understand the solution . 
Can anybody provide me the solution in simple words (without the term mod)
 A: We want the units digit of $3^a+7^b$ to be $8$. That means we only care about the units digit of $3^a$ and $7^b$. So let's see what happens to those units digits for different exponents:
$$
\begin{array}{c|cc}
n & 3^n & 7^n\\
\hline0&1&1\\
1&3&7\\
2&9&9\\
3&7&3\\
4&1&1\\
5&3&7
\end{array}
\\
\vdots
$$
So as you can see, both for $3^n$ and $7^n$ the units digit repeats with period $4$ (this part is where modular arithmetic really shines: If you are familiar with it, then just stating what I've said above in that framework  proves beyond all doubt that nothing funny happens further out). That means, for instance, that $a = 2$ gives the same result as $a = 6$ or $a = 98$, and the same for $b$. If we divide $\{0,1,2,\ldots,98,99\}$ into subsets depending on which of these categories they fall into, we get $\{0,4,8,\ldots,92,96\}$ and $\{1,5,9,\ldots,93,97\}$ and $\{2,6,\ldots,94,98\}$ and $\{3,7,\ldots,95,99\}$. We've established that the only thing that matters is which of these four sets $a$ and $b$ fall into. They all have the same size, so for any specific such set, the probability that the $a$ we pick is from that set is $1/4$, and the same for $b$. That means that any specific choice for $a$ and $b$ simultaneously has probability $\frac1{16}$.
The last part is figuring out how many of these combinations give $8$ as units digit. We can do this just by picking from the table above. If $a\in\{0,\ldots,96\}$, then the units digit of $3^a$ is $1$, so we need the units digit of $7^b$ to be $7$. This means that $b$ must be in $\{1, \ldots,97\}$.
Similarly, if $a\in\{1,\ldots,97\}$, then there is no $b$ that works. If $a\in \{2,\ldots,98\}$, then we must have $b\in \{2,\ldots,98\}$ as well, because $9+9$ is what gives $8$ as units digit. Lastly, we may pick $a \in \{3,\ldots,99\}$, which forces $b \in \{0,\ldots,96\}$.
All in all, from the $16$ different equally likely combinations, there are $3$ that works. Therefore the probability is $\boxed{\!\frac3{16}}$
