import java.util.*; //This is used to import the Scanner
class Main {
public static void main(String[] args) {
System.out.println("Hello world!");
Scanner ValCents = new Scanner (System.in);
System.out.println("Enter Number:");
int user_input = ValCents.nextInt();
int result = user_input/100; // This one will solve for the one dollar bills.
int remain = user_input % 100; // This one will get the remainder of cents.
System.out.println(result + " One Dollar Bills");
System.out.println(remain + " Cents");
}
}
Remember that you need to get the amount of dollar bills separately from the number of cents. This is because the int variable will always return the whole value of the number. The modulo is used to get the variable of the cents as the whole number is already taken by the "result".