Last active
November 4, 2015 04:11
-
-
Save tanakaedu/9db56f2727d37443a9b6 to your computer and use it in GitHub Desktop.
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.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.util.Random; | |
public class Janken { | |
static Random rg = new Random(); | |
public static void main(String[] args) throws Exception { | |
int comp; | |
// 0~2までの乱数をint型の変数compに求める | |
comp=rg.nextInt(3); | |
// 試しで、変数compを出力する | |
System.out.print(""+comp); | |
// Here your code ! | |
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); | |
String line = br.readLine(); | |
} | |
} |
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.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.util.Random; | |
public class Main { | |
static Random rg = new Random(); | |
public static void main(String[] args) throws Exception { | |
int comp; | |
// 0~2までの乱数をint型の変数compに求める | |
comp=rg.nextInt(3); | |
// 試しで、変数compを出力する | |
System.out.print(""+comp); | |
// Here your code ! | |
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); | |
String line = br.readLine(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment