for loop above if condition is starting from coin and operation is increment in loop so value of i will be always >= coin hence if condition is redundant there