Question: If Statements: 3 . Define an integer variable called myNumber and assign it a value of your choice 4 . Write code using If Statements
If Statements:
Define an integer variable called myNumber and assign it a value of your choice
Write code using If Statements and the mod operator to determine whether this number is even or odd
Display a message in the logi such as is even or is odd depending on myNumbers value
For Loops:
Define an integer variable called numberRows and assign it a value of your choice
Use the numberRows variable input to create a reverse pyramid in the Log.i For example, if numberRows then the output should look like this:
HINT: You will need to concatenate the string to do this since Log.i prints a new line
Your loop should have a String assignment with and you print to the Log outside the inner loop
Methods:
Create a method called max which returns a double and takes two doubles as parameters
Write code inside the method to return the larger of the two parameters
eg If you pass in and it returns
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
