What's wrong in this?

@Nitya_Somani,
What is the purpose of int target = scan.nextInt() ? Remove that and code will work fine :slight_smile:

1 Like