Lab3_5.java - Matthew Brannon This program has a secret age...

This preview shows page 1 out of 1 page.

/* Matthew Brannon This program has a secret age, weight, and birth month and takes user input to compare them and display a message if conditions are met */ import java.io.*; import java.util.Scanner; public class Lab3_5{ //Declare global variables static int age; static int weight; static String birthMonth; Scanner input = new Scanner(System.in); public static void main(String[] args){ getAge();//call to get input getWeight(); getMonth(); //Blank line to separate input from output System.out.println(""); correctAnswers(); } public static void getAge(){ System.out.print("Enter your guess for age: ");

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture