Advertisement
jaVer404

level04.lesson06.task05

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