From 9d53d8857eaa1c9405894a88ca75bc4657e42f35 Mon Sep 17 00:00:00 2001 From: msglm Date: Sat, 14 Jan 2023 05:31:48 -0600 Subject: Inital Commit --- Java/Vote.java | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Java/Vote.java (limited to 'Java/Vote.java') diff --git a/Java/Vote.java b/Java/Vote.java new file mode 100644 index 0000000..e0375e7 --- /dev/null +++ b/Java/Vote.java @@ -0,0 +1,24 @@ +import java.io.BufferedReader; + +import java.io.InputStreamReader; + +class Vote { + public static void main(String[] args) throws java.io.IOException { + int age; + System.out.println("input amount:"); + BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); + age = Integer.parseInt(input.readLine()); + if (age > 18){ + System.out.println("you can vote"); + } else { + System.out.println("you cannot vote"); + } + + + + + + } +} + +//By msglm; Licensed under the AGPL v3 -- cgit v1.2.3