Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.javarush.test.level04.lesson06.task06;
- /* И 18-ти достаточно
- Ввести с клавиатуры имя и возраст. Если возраст больше 20 вывести надпись «И 18-ти достаточно».
- */
- import java.io.*;
- public class Solution
- {
- public static void main(String[] args) throws Exception
- {
- BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
- String name;
- int age;
- name = reader.readLine();
- age = Integer.parseInt(reader.readLine());
- if (age > 20)
- System.out.println("И 18-ти достаточно");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement