WA Printing hex numbers : I  want to write a program which prints hex number when an integer between 0 and 100 is given as an input. What is wrong with my code?

    import java.util.*;
    public class Main {
        public static void main(String[] args) {
            Scanner input = new Scanner(System.in);
            int n, p, q;
            n = input.nextInt();
            p = n / 16;
            q = n % 16;
            if (q == 10)
                System.out.println(p + "" + "a");
            else if (q == 11)
                System.out.println(p + "" + "b");
            else if (q == 12)
                System.out.println(p + "" + "c");
            else if (q == 13)
                System.out.println(p + "" + "d");
            else if (q == 14)
                System.out.println(p + "" + "e");
            else if (q == 15)
                System.out.println(p + "" + "f");
            else if (p == 0)
                System.out.println(q);
            else
                System.out.println(p + "" + q);
        }
    }
