/* * Test 1 Question 2 content */ package t1q2; import java.util.Scanner; /** * * @author jcmtiernan */ public class T1Q2 { /** * @param args the command line arguments */ public static void main(String[] args) { int a = 0, b = 0, c = 0; int x, y, z; boolean abool = false; boolean bbool = false; boolean cbool = false; Scanner input = new Scanner(System.in); // get user input to give values to a, b, and c System.out.print("Please enter a line of input that contains three integers : "); a = input.nextInt(); b = input.nextInt(); c = input.nextInt(); if ((a % 2) != 0) { abool = true; } if ((b / 2) < (b / 2.0)) { bbool = true; } if ((Math.ceil( (c * .5)) > Math.floor(c * .5))) { cbool = true; } System.out.printf("\n%9s %6d %6d %6d \n","Inputs",a,b,c); System.out.printf("%9s %6b %6b %6b \n","Results",abool,bbool,cbool); } }