// CSE 142 Lecture 8 // Scanner, if/else import java.util.*; // For Scanner // Calculates the lowest age of a person that the user can date // using the formula age / 2 + 7. public class DatingAge { public static void main(String[] args) { Scanner console = new Scanner(System.in); System.out.print("What is your age? "); int age = console.nextInt(); int minAge = age / 2 + 7; System.out.println("Minimum dating age: " + minAge); } }