Question: Is a Java Code an integer between 10 and 50 is generated randomly, and the player should guess if the generated number is a prime

Is a Java Code

an integer between 10 and 50 is generated randomly, and the player should guess if the generated number is a prime number. A number is prime, if it is evenly divisible by 1 and itself. The player earns 5 points if the answer is correct.

we want user to answer in yes or no and compare that

like if asked 48 is prime and user said no then he right and get points

and if asked 13 is prime and user said yes then give points

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!