質問編集履歴

2

修正

2021/06/20 05:24

投稿

yukki_nakasawa
yukki_nakasawa

スコア3

test CHANGED
File without changes
test CHANGED
@@ -20,46 +20,66 @@
20
20
 
21
21
 
22
22
 
23
- |import java.io.*;|
24
23
 
25
- |:----|
26
24
 
27
- |import java.lang.*;|
25
+ ```Java
28
26
 
29
- |public class Sankome{|
27
+ import java.io.*;
30
28
 
31
- | public static void main(String[] args){|
29
+ import java.lang.*;
32
30
 
33
- | BufferedReader br =|
31
+ public class Sankome{
34
32
 
35
- | new BufferedReader(new InputStreamReader(System.in));|
33
+ public static void main(String[] args){
36
34
 
37
- | String str1,str2,str3,str4;|
35
+ BufferedReader br =
38
36
 
39
- | int num1,num2,num3,num4,result;|
37
+ new BufferedReader(new InputStreamReader(System.in));
40
38
 
41
- |try {|
39
+ String str1,str2,str3,str4;
42
40
 
43
- |str1 = br.readLine();|
41
+ int num1,num2,num3,num4,result;
44
42
 
45
- |str2 = br.readLine();str3 = br.readLine();str4 = br.readLine();|
46
43
 
47
- |num1 = integer.parselnt(str1);num2 = integer.parselnt(str2);|
48
44
 
49
- |num3 = integer.parselnt(str3);|
45
+ try {
50
46
 
51
- |num4 = integer.parselnt(str4);|
52
47
 
53
- |result = (num1 + num2 + num3 + num4) / 4;|
54
48
 
55
- |System.out.println("四ヶ月分のアルバイト料の平均は" + result + "円です");}|
49
+ str1 = br.readLine();
56
50
 
57
- |catch(IOException ioe){|
51
+ str2 = br.readLine();
58
52
 
59
- |System.out.println(e.getMessage());|
53
+ str3 = br.readLine();
60
54
 
61
- |} |
55
+ str4 = br.readLine();
62
56
 
63
- |}|
57
+
64
58
 
59
+ num1 = integer.parselnt(str1);
60
+
61
+ num2 = integer.parselnt(str2);
62
+
63
+ num3 = integer.parselnt(str3);
64
+
65
+ num4 = integer.parselnt(str4);
66
+
67
+
68
+
69
+ result = (num1 + num2 + num3 + num4) / 4;
70
+
71
+ System.out.println("四ヶ月分のアルバイト料の平均は" + result + "円です");
72
+
65
- |}|
73
+ }
74
+
75
+ catch(IOException ioe){
76
+
77
+ System.out.println(e.getMessage());
78
+
79
+ }
80
+
81
+ }
82
+
83
+ }
84
+
85
+ ```

1

マークダウンにしました。

2021/06/20 05:23

投稿

yukki_nakasawa
yukki_nakasawa

スコア3

test CHANGED
File without changes
test CHANGED
@@ -20,60 +20,46 @@
20
20
 
21
21
 
22
22
 
23
- import java.io.*;
23
+ |import java.io.*;|
24
24
 
25
- import java.lang.*;
25
+ |:----|
26
26
 
27
- public class Sankome{
27
+ |import java.lang.*;|
28
28
 
29
- public static void main(String[] args){
29
+ |public class Sankome{|
30
30
 
31
- BufferedReader br =
31
+ | public static void main(String[] args){|
32
32
 
33
- new BufferedReader(new InputStreamReader(System.in));
33
+ | BufferedReader br =|
34
34
 
35
- String str1,str2,str3,str4;
35
+ | new BufferedReader(new InputStreamReader(System.in));|
36
36
 
37
- int num1,num2,num3,num4,result;
37
+ | String str1,str2,str3,str4;|
38
38
 
39
+ | int num1,num2,num3,num4,result;|
39
40
 
41
+ |try {|
40
42
 
41
- try {
43
+ |str1 = br.readLine();|
42
44
 
45
+ |str2 = br.readLine();str3 = br.readLine();str4 = br.readLine();|
43
46
 
47
+ |num1 = integer.parselnt(str1);num2 = integer.parselnt(str2);|
44
48
 
45
- str1 = br.readLine();
49
+ |num3 = integer.parselnt(str3);|
46
50
 
47
- str2 = br.readLine();
51
+ |num4 = integer.parselnt(str4);|
48
52
 
49
- str3 = br.readLine();
53
+ |result = (num1 + num2 + num3 + num4) / 4;|
50
54
 
51
- str4 = br.readLine();
55
+ |System.out.println("四ヶ月分のアルバイト料の平均は" + result + "円です");}|
52
56
 
53
-
57
+ |catch(IOException ioe){|
54
58
 
55
- num1 = integer.parselnt(str1);
59
+ |System.out.println(e.getMessage());|
56
60
 
57
- num2 = integer.parselnt(str2);
61
+ |} |
58
62
 
59
- num3 = integer.parselnt(str3);
63
+ |}|
60
64
 
61
- num4 = integer.parselnt(str4);
62
-
63
-
64
-
65
- result = (num1 + num2 + num3 + num4) / 4;
66
-
67
- System.out.println("四ヶ月分のアルバイト料の平均は" + result + "円です");
68
-
69
- }
65
+ |}|
70
-
71
- catch(IOException ioe){
72
-
73
- System.out.println(e.getMessage());
74
-
75
- }
76
-
77
- }
78
-
79
- }