Advertisement
Azazavr

com.javarush.test.level04.lesson06.task05

Oct 17th, 2016
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.64 KB | None | 0 0
  1. package com.javarush.test.level04.lesson06.task05;
  2.  
  3. /* 18+
  4. Ввести с клавиатуры имя и возраст. Если возраст меньше 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 < 18)
  22.             System.out.println("Подрасти еще");
  23.  
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement