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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!