Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started