American Express Interview Question

Java questions, some logic questions