All pastes #958007 Raw Edit

Stuff

public text v1 · immutable
#958007 ·published 2008-03-26 12:01 UTC
rendered paste body
/** Bill McKenney
* HTHS
* Local facilitator: Mrs. Purves
* Assignment number: J5 */
 
import java.io.*;
class OddEven
{
     public static void main (String[] args) throws IOException
    {
        InputStreamReader inStream = new InputStreamReader (System.in);
        BufferedReader stdin = new BufferedReader (inStream);
        String inData; // variable for input 

        int i1;
        
        System.out.println ("Input an integer."); // tells user to input a value
        inData = stdin.readLine ( ); // processes input 
        i1 = Integer.parseInt (inData); // changes char to integer


	// conditions determining the period of time in which the items shall be microwaved
	if (i1 % 2 == 0)
		{
       		System.out.println ("Is " + i1 + " an even or odd number?  Even"); 
		}
	else 
		{
       		System.out.println ("Is " + i1 + " an even or odd number?  Odd");
		}
	
    }
}