Since this is homework, I can't use built-in functions. I have to use algorithms in Java.
This is what I have so far but it is wrong.
import java.util.Scanner;
public class ChangingFigures {
public static void main (String[] args){
Scanner scanner = new Scanner (System.in);
System.out.print("Enter an integer between 0 and 127:");
int num = scanner.nextInt ();
String hex = Integer.toHexString(num);
String bin = Integer.toBinaryString(num);
// ...
}
}