This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
import java.util.*; | |
public class FizzBuzz { | |
public static void main(String[] args) throws IOException { | |
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); | |
System.out.println("カウント上限を入力して下さい。"); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FizzBuzz { | |
public static void main(String[] args) { | |
for (int i=1; i>100; i++) { | |
if ((i%3 == 0) && (i%5 == 0)) { | |
System.out.println("FizzBuzz" + ","); | |
} else if (i%3 == 0) { | |
System.out.println("Fizz" + ","); | |
} else if (i%5 == 0) { | |
System.out.println("Buzz" + ","); | |
} else { |
NewerOlder