算术运算符 模运算

时间:2021-04-13 12:33:43   收藏:0   阅读:0

package com.zhang.www.base.operater;

public class Demo05 {
public static void main(String[] args) {
//关系运算符返回的结果: 正确,错误 布尔值表示
//if
int a=10;
int b=20;
int c=22;
//取余,模运算
System.out.println(c%b);//c/b 22/20=1......2
System.out.println(a>b);
System.out.println(a<b);
System.out.println(a==b);
System.out.println(a!=b);

}

}

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!