-3

...........i how to nihas zero answers has only one answer, but that answer has no upvoteshas zero answers has only one answer, but that answer has no upvoteshas zero answers has only one answer, but that answer has no upvotes

John jack
  • 5
  • 1

1 Answers1

0

I wont show you how to answer the whole problem. But you seem confused primarily regarding the random part. Here is how you do that.

Random rand = new Random();
int i = 582; // some arbitrary integer to act as the input
int randInt = rand(5) + 5; // random value from 5 - 9 inclusive
int j = i + randInt; // add the random value to the output integer

i is your integer from the input file and j is your output integer.