Visa Inc. interview question

nothing unexpected, simple java code to write method with loops.