Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
fortune
//'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_111 import java.util.*; import java.lang.*; class Rextester{ public static void main(String[]args){ int uranai = new java.util.Random().nextInt(4); System.out.println("あなたの運勢を占います!!!"); switch(uranai){ case 1: System.out.println("あなたの運勢は「Super Happy」です!"); break; case 2: System.out.println("あなたの運勢は「Happy」です!"); break; case 3: System.out.println("あなたの運勢は「Good」です。"); break; default: System.out.println("あなたの運勢は「soso...」です。"); } /*改行*/ System.out.println("あなたの運勢を占います!"); int fortune = new java.util.Random().nextInt(4); if (fortune == 1){ System.out.println("あなたの運勢は「大吉」です!"); } else if (fortune == 2){ System.out.println("あなたの運勢は「中吉」です。"); } else if (fortune == 3){ System.out.println("あなたの運勢は「凶」です。。"); } else{ System.out.println("あなたの運勢は「大凶」です!!"); } } }
run
|
edit
|
history
|
help
0
several at a time
Kochergina
call function
Only I love u
fizzbuzz
Kochergina_1
test
Day
jkbvlghckgh
Word Destructor