i started studying java about 2 or 3 months ago and i am fairly sucky at algorithms and i started working on a project and right now i need to figure out an algorithm.
Basically, it should go like this:
x (final output) is randomly chosen from 1 to 50. Simple. However, i want it to gradually get harder to get something high depending on variable y. Check the example below to see what i mean.
Example (Final output is x): X = 2 while y is 1. X = 2 while y is 1. X = 5 while y is 2. X = 9 while y is 6. X = 12 while y is 10. X = 14 while y is 15.`
See where i'm getting? It gradually get harder. I'm sure it's not that complicated to do but i can't figure it out.
Thanks.