package zh.codegym.task.task03.task0301;
/*
分裂是好的
*/
public class Solution {
public static void main(String[] args) {
div(6, 3);
div(10, 6);
div(2, 4);
}
public static void div(int a, int b) {
//在此编写你的代码
int x1 = 6/3;
int x2 = 10/6;
int x3 = 2/4;
System.out.println(x1);
System.out.println(x2);
System.out.println(x3);
}
How to use div methods?
已解决
评论 (4)
- 受欢迎
- 新
- 旧
你必须先登录才能发表评论
Jakub Góźdź
13 二月 2020, 13:12
1. Inside main method, you are calling div method passing two arguments (number a and number b) but never use them inside div method.
2. You are calling div method 3 times. Why do you multiply the algorithm inside the body of div method?
Solution:
+1
TingYi Chiang
14 二月 2020, 02:49
Thank you for answering my question! But this code still cannot pass the task, the web shown the same yellow symbol and failed...
0
Jakub Góźdź
14 二月 2020, 08:16解决方法
Try this one:
+2
TingYi Chiang
10 七月 2020, 04:37
Thank you very much!
0