Initial Commit

This commit is contained in:
2012-01-22 16:14:32 -05:00
commit f5e306f67f
155 changed files with 5097 additions and 0 deletions

35
Java/EvenOrOdd.java Normal file
View File

@@ -0,0 +1,35 @@
/**
* @date 10, 24, 2010
* @author ricky.barrette
* @author Twenty Codes, LLC
*/
import java.util.Scanner;
/*
* this class will be used to demostrate how to use an if/else block
* @author ricky.barrette
*/
public class EvenOrOdd{
/*
* this is the main method of the class
* @param args from command line
* @author ricky.barrette
*/
public static void main(String[] args){
//prepear the variables and the sccanner for input
Scanner scan = new Scanner(System.in);
int input;
//ask user for input and get the input
System.out.print("Enter a number: ");
input = scan.nextInt();
//process the input and print the results
if ( (input % 2) == 0){
System.out.println("The number is even");
} else {
System.out.println("The number is odd");
}
}
}
//END CLASS