edited by
236 views

1 Answer

1 votes
1 votes

Answer D

Let is consider a number as 123456

  • In to get $1^{st}$ digit from right  $\frac{123456}{10^{0}} = 123456 % 10$ = 6$
  • In to get $2^{nd}$ digit from right  $\frac{123456}{10^{1}} = 12345  % 10$ = 5$
  • In to get $3^{rd}$ digit from right  $\frac{123456}{10^{2}} = 1234    % 10   = 4$
  • In to get $4^{th}$ digit from right  $\frac{123456}{10^{3}} = 123      % 10   = 3$
  • In to get $i^{th}$ digit from right  $\frac{123456}{10^{i-1}} = 123      % 10   = 3$

So, if the number is N, its $i^{th}$ digit from right would be $\left [ \frac{N}{10^{i-1}} \right ] mod 10$

Related questions

0 votes
0 votes
1 answer
1
VS asked Apr 9, 2017
379 views
0 votes
0 votes
2 answers
2
VS asked Apr 9, 2017
299 views
0 votes
0 votes
2 answers
3
VS asked Apr 9, 2017
452 views
0 votes
0 votes
3 answers
4
VS asked Apr 9, 2017
464 views