public class Main {
public static void main(String[] args) {
int [] seq = new int [10];
//配列をランダムに生成
for (int i = 0; i < seq.length; i++) {
seq[i] = new java.util.Random().nextInt(4);
}
//記号を表示
for (int i = 0; i < seq.length; i++) {
switch (seq[i]) {
case 0:
System.out.print("A");
break;
case 1:
System.out.print("T");
break;
case 2:
System.out.print("G");
break;
case 3:
System.out.print("C");
break;
}
}
}
}
More than 3 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme