Most inputs to the program turn out great yet when I utilize huge numbers for example 20 the value is incorrect.
Code
int n = Comp122.getInt("What number would you like to make a factorial?");
int factorial = 1;
for (int i = 1 ; i<=n ; i++) {
factorial*=i;
System.out.println(factorial);
}
From Scaler (https://www.scaler.com/topics/binary-to-decimal-in-java/) and Wiki (https://en.wikipedia.org/wiki/Binary-coded_decimal) I got the resolution, but still unsure about it. Need your valuable insights on it. Is there a way I could change over the decimal numbers and result them as binary?