Question: Write a program that prompts the user to enter their birth year. Check if the year is a leap year. If it is , print

Write a program that prompts the user to enter their birth year. Check if the year is a leap year. If it is, print Your birth year [year] is a leap year. If not, print Your birth year [year] is NOT a leap year.
Generate a random three digit number (i.e. number between 100 and 1000) using Math.random. Prompt a guess from the user. If the user does not follow instructions by entering a 3-digit number, terminate the program using System.exit. If the entered number is appropriate, compare with the generated random number and print out if they won or not.
Write the equivalent conditional operator statement of the following if-else structure. If(a<10)
b =single-digit; else
b =not single-digit;

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 Programming Questions!