0

Odd and even numbers

Hi all, I am trying to figure out how to use a baseNumber, the subsequent numbers added I tried to do methods to check the even and odd numbers using the baseNumber as base to it. I am just a beginner in java. package MockExercises; import java.util.Scanner; public class Mock2 { static Scanner keyboard=new Scanner(System.in); static int baseNumber = 0; static int value1 = 0; static int value2 = 0; static int getNumber() { System.out.print("Please enter a number in a range 1-10: "); return (bas

3rd May 2018, 6:44 AM
RaphaelNogueira
RaphaelNogueira - avatar
0 Réponse