• + 0 comments

    @rtmrdnk I'm getting correct result by your code but not by below code in Java8, can you tell why?

    for(int i=1;i<=n;sum+=(n%i++==0?i:0));