Write a small program. otherwise "trial and error"

Find the smallest number such that if its rightmost digit is placed at its left end, the new number so formed is precisely 50% larger than the original number.


The answer is 285714.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Aryan Gaikwad
Apr 19, 2015
1
2
3
for(int i = 10;;i++)
    if(Integer.parseInt(Integer.toString(i % 10) + Integer.toString(i / 10)) == i * 1.5)
        System.out.println(i);

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...