Check out example codes for "find mod in cpp". It will help you in understanding the concepts better.

Code Example 1

// 	Mode(%) => to get remainder
	1 % 10 = 1
 	2 % 10 = 2
    10 % 10 = 0

Learn ReactJs, React Native from akashmittal.com