if ( age < 17 )
Here is the complete program,
with the blank filled in correctly:
import java.io.*; class BoxOffice { public static void main (String[] args) throws IOException { BufferedReader stdin = new BufferedReader ( new InputStreamReader(System.in)); String inData; int age; System.out.println("Enter your age:"); inData = stdin.readLine(); age = Integer.parseInt( inData ); if ( age < 17 ) { System.out.println("Child rate."); } else { System.out.println("Adult rate."); } System.out.println("Enjoy the show."); } } |
Here is what happens for one run of the program:
|