16

package shufei1;

public class Demo10 {
public static void main(String[] args) {
//二元运算符
//Ctrl+D:复制当前一行到下一行
int a =10;
int b =20;
int c =25;
int d =25;

System.out.println(a+b);
System.out.println(a-b);
System.out.println(a*b);
System.out.println(a/(double)b);//等于0.5,四舍五入取0,中间加double,变成正确

}

}

posted on 2021-01-08 00:05  书费  阅读(40)  评论(0编辑  收藏  举报

导航