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.util.Scanner; | |
public class En07_03 { | |
public static void main(String[] args) { | |
Scanner stdIn = new Scanner(System.in); | |
System.out.println("3つの整数値を入力して下さい"); | |
System.out.print("整数a:"); | |
int a = stdIn.nextInt(); |
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.util.Scanner; | |
public class En07_02 { | |
public static void main(String[] args) { | |
Scanner stdIn = new Scanner(System.in); | |
System.out.println("3つの整数値を入力して下さい"); | |
System.out.print("整数a:"); | |
int a = stdIn.nextInt(); |
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.util.Scanner; | |
public class En07_01 { | |
public static void main(String[] args) { | |
Scanner stdIn = new Scanner(System.in); | |
System.out.println("入力した整数の値によって以下のように表示します。"); | |
System.out.println("負:-1 0:0 正:1"); | |
System.out.print("整数を入力:"); | |
int n = stdIn.nextInt(); |
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.util.Scanner; | |
public class En06_19 { | |
public static void main(String[] args) { | |
Scanner stdIn = new Scanner(System.in); | |
// クラス数を決定 | |
System.out.print("クラス数:"); | |
int classMax = stdIn.nextInt(); | |
int[][] classes = new int[classMax][]; |
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.util.Scanner; | |
public class en06_18 { | |
public static void main(String[] args) { | |
Scanner stdIn = new Scanner(System.in); | |
int[][] c; | |
// 行数を入力させる |
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.util.Random; | |
public class En06_17 { | |
public static void main(String[] args) { | |
Random rand = new Random(); | |
// 生徒6人分の変数 | |
int student = 6; | |
// 6人のstudents多次元配列を作成 |
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.util.Scanner; | |
public class En06_16 { | |
public static void main(String[] args) { | |
Scanner stdIn = new Scanner(System.in); | |
final int max = 4; | |
final int d = 3; | |
// 4行3列の行列を作成 |
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.util.Random; | |
import java.util.Scanner; | |
public class En06_15 { | |
public static void main(String[] args) { | |
Random rand = new Random(); | |
Scanner stdIn = new Scanner(System.in); | |
// 曜日配列を作成 | |
String[] weeks = { "sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday" }; |
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.util.Random; | |
import java.util.Scanner; | |
public class En06_14 { | |
public static void main(String[] args) { | |
Random rand = new Random(); | |
Scanner stdIn = new Scanner(System.in); | |
// 月を作成 | |
String[] Month = { "January", "February", "March", "April", "May", "Jun", "July", "August", "September", |
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.util.Scanner; | |
public class En06_13 { | |
public static void main(String[] args) { | |
Scanner stdIn = new Scanner(System.in); | |
System.out.print("要素数:"); | |
int n = stdIn.nextInt(); | |
// 配列aと配列bを作成 |