Advertisement
Azazavr

com.javarush.test.level04.lesson06.task06

Oct 17th, 2016
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.71 KB | None | 0 0
  1. package com.javarush.test.level04.lesson06.task06;
  2.  
  3. /* И 18-ти достаточно
  4. Ввести с клавиатуры имя и возраст. Если возраст больше 20 вывести надпись «И 18-ти достаточно».
  5. */
  6.  
  7. import java.io.*;
  8.  
  9. public class Solution
  10. {
  11.     public static void main(String[] args) throws Exception
  12.     {
  13.         BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
  14.        
  15.         String name;
  16.         int age;
  17.        
  18.         name = reader.readLine();
  19.         age = Integer.parseInt(reader.readLine());
  20.        
  21.         if (age > 20)
  22.             System.out.println("И 18-ти достаточно");
  23.  
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement