From 9d53d8857eaa1c9405894a88ca75bc4657e42f35 Mon Sep 17 00:00:00 2001 From: msglm Date: Sat, 14 Jan 2023 05:31:48 -0600 Subject: Inital Commit --- Java/Dollars.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Java/Dollars.java (limited to 'Java/Dollars.java') diff --git a/Java/Dollars.java b/Java/Dollars.java new file mode 100644 index 0000000..faa927c --- /dev/null +++ b/Java/Dollars.java @@ -0,0 +1,21 @@ +import java.io.BufferedReader; +import java.io.InputStreamReader; + +class Dollars { + public static void main(String[] args) throws java.io.IOException { + int dollars, cents; + + BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); + dollars = Integer.parseInt(input.readLine()); + cents = dollars%100; + dollars = (dollars-cents)/100; + System.out.println("this is $" + dollars + " dollars and " + cents + " cents"); + + + + + + } +} + +//By msglm; Licensed under the AGPL v3 -- cgit v1.2.3