第3章:检测数字
来源:互联网 发布:淘宝卖家骂人怎么处罚 编辑:程序博客网 时间:2024/05/07 13:29
/** * 检测数字。 * 提示用户输入一个整数: * 判断这个整数是否能被5和6整除,或者不能被它们中的任何一个整除,或者只能被其中一个整除。 */package Test;import java.util.Scanner;public class T312Scanner {public static void main(String[] args) {Scanner input = new Scanner(System.in);System.out.print("Enter a integer: ");int number = input.nextInt();if (number % 5 == 0 && number % 6 == 0)System.out.println(number + " is divisible by both 5 and 6!");elseSystem.out.println((number % 5 == 0 || number % 6 == 0)? number + " is divisible by 5 or 6, but not both!": number + " is not divisible by either 5 or 6!");}}
- 第3章:检测数字
- 第3章项目4 猜数字
- 第3章 随机变量的数字特征
- 《数字技术》连载3:第1章概述 第3节 数字的表示,进位制问题。
- 《数字技术》连载8: 第2章 数字器件 第3节 DTL门电路
- 第9章 客户端检测
- 对数字的检测
- 输入数字检测
- 非法数字检测
- jquery检测数字
- SVM 手写数字检测
- 银行卡的数字检测
- 数字检测--isdigit函数
- 第13章 错误检测和校正
- 第8章 检测浏览器和操作系统
- 第9章 客户端检测小结
- 《数字技术》连载21: 第3章 逻辑设计初步 第1节 概述:任务和例子
- 《数字技术》连载22: 第3章 逻辑设计初步 第2节 概述:方法和步骤
- java.lang.IllegalStateException: Cannot forward after response has been committe
- C# 实现对XML文件的基本操作(创建xml文件,增、删、改、查 xml节点信息)
- 从nginx访问日志中的400错误说起
- 纪念华君 (转载)
- Zend studio 9.04集成aptana 3.0
- 第3章:检测数字
- 47金山CEO张宏江:2013年移动医疗领域或有大爆发
- cell phone data cable usb serial port
- [转]安装WINCE6.0经验和试用版 Plarform Builder 6.0到期后的解决办法
- Asp.Net分页存储过程
- PHP 5.3 配置 mssql (sqlserver)
- Android G1 Serial to USB Cable
- getPath getAbsolutePath和getCanonicalPath的区别
- 随笔:ABCDE*?=EDCBA 求A、B、C、D、E、?分别代表什么数字