All of these problems are to be one in the same app. For each problem, create a button that executes your solution when clicked.
Tip: Take it in small steps. First, get all necessary user input and store them in variables. Then, take the variables to solve your problem.
Question 1
The user inputs two numbers. Print the larger number. For example, if the two numbers are:
int a = 7;
int b = 2;
You should print "7" to the console.
Question 2
Let's take that up a notch. You have four numbers from the user. Print the largest number.
Question 3
When the user inputs a year, determine if it’s a leap year: https://en.wikipedia.org/wiki/Leap_year. A leap year has 366 days instead of the normal 365 days.
Leap years occur every 4 years. This rule is valid except that every 100 years special rules apply. Years that are divisible by 100 are not leap years, but if they are also divisible by 400 they are leap years.
Look up online how you can find whether a number is divisible by another number.
Examples:
2012, 2016 are leap years: divisible by 4.
1900 was NOT a leap year: divisible by 4, but also divisible by 100.
2000 was a leap year: divisible by 4, but not by 100, BUT not by 400.