commit 4f1475dfa82d316d9476544814b7ff163084082c Author: blzimme000 Date: Fri Jan 14 07:06:22 2022 -0600 Initial commit Works perfectly. diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/description.html b/.idea/description.html new file mode 100644 index 0000000..db5f129 --- /dev/null +++ b/.idea/description.html @@ -0,0 +1 @@ +Simple Java application that includes a class with main() method \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..97626ba --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..b5b16a9 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..faf3b05 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/project-template.xml b/.idea/project-template.xml new file mode 100644 index 0000000..1f08b88 --- /dev/null +++ b/.idea/project-template.xml @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/FizzBuzz.iml b/FizzBuzz.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/FizzBuzz.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/out/production/FizzBuzz/com/company/Main.class b/out/production/FizzBuzz/com/company/Main.class new file mode 100644 index 0000000..df17666 Binary files /dev/null and b/out/production/FizzBuzz/com/company/Main.class differ diff --git a/src/com/company/Main.java b/src/com/company/Main.java new file mode 100644 index 0000000..fbf7a4b --- /dev/null +++ b/src/com/company/Main.java @@ -0,0 +1,27 @@ +package com.company; + +import java.util.Scanner; + +public class Main { + + public static void main(String[] args) { + Scanner scan = new Scanner(System.in); + System.out.println("Input the number to stop at:"); + int stop = scan.nextInt(); + for (int i = 1; i <= stop; i++){ + boolean flag = true; + if (i % 3 == 0){ + System.out.print("Fizz"); + flag = false; + } + if (i % 5 == 0){ + System.out.print("Buzz"); + flag = false; + } + if (flag){ + System.out.print(i); + } + System.out.println(); + } + } +}