- Write Multiple If Statements If Caryear Is Before 1968 Print Probably Has Few Safety Features Without Quotes If 1 (34.7 KiB) Viewed 47 times
Write multiple if statements: If carYear is before 1968, print "Probably has few safety features." (without quotes). If
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Write multiple if statements: If carYear is before 1968, print "Probably has few safety features." (without quotes). If
Write multiple if statements: If carYear is before 1968, print "Probably has few safety features." (without quotes). If after 1970, print "Probably has seat belts.". If after 1991, print "Probably has anti-lock brakes.". If after 2002, print "Probably has tire-pressure monitor.". End each output with a period and a newline. Ex: carYear 1995 prints: Probably has seat belts. Probably has anti-lock brakes. 1 import java.util.Scanner; 2 3 public class Safety Features { 4 public static void main (String [] args) { int carYear; 5 6 7 Scanner input = new Scanner(System.in); carYear input.nextInt(); 8 9 10 /* Your code goes here */ 11 12 13} }