in Algorithms edited by
232 views
1 vote
1 vote

in Algorithms edited by
by
232 views

1 Answer

1 vote
1 vote

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 in Quantitative Aptitude Apr 9, 2017
368 views
VS asked in Quantitative Aptitude Apr 9, 2017
by VS
368 views
0 votes
0 votes
2 answers
2
VS asked in Verbal Aptitude Apr 9, 2017
294 views
VS asked in Verbal Aptitude Apr 9, 2017
by VS
294 views
0 votes
0 votes
2 answers
3
VS asked in Quantitative Aptitude Apr 9, 2017
457 views
VS asked in Quantitative Aptitude Apr 9, 2017
by VS
457 views
0 votes
0 votes
3 answers
4
VS asked in Quantitative Aptitude Apr 9, 2017
463 views
VS asked in Quantitative Aptitude Apr 9, 2017
by VS
463 views