Question: Write a method named generateInt that accepts one int parameter and returns int (random) with exactly that many digits. Call to generateInt(3) could return 212
Write a method named generateInt that accepts one int parameter and returns int (random) with exactly that many digits. Call to generateInt(3) could return 212 or 354 or 442 etc... but not 3 and 12, that would not be acceptable. Example use shown below.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
