You code contains lot of weird thing i don't know why you are using the for loop and your IF condition is completely weird.
It seems like you are trying to take two value and wants to display the...