4-3逻辑非运算符及案例 4-4

 

 

 

 

 

 

创建类

LoginDemo3

 

 

 

 

这里取反

!(n%3==0)

 

 

 

 

 

 

package com.imooc.operator;
import java.util.Scanner;public class LoginDemo3 {public static void main(String[] args) {// TODO Auto-generated method stubSystem.out.println("请输入一个整数");Scanner sc=new Scanner(System.in);int n=sc.nextInt();//能否被3整除 就是对3取余if(!(n%3==0)){System.out.println(n+"不能被3整数!");}else{System.out.println(n+"能被3整数!");}}}

 

 

4-3

 

 

转载于:https://www.cnblogs.com/wangjunwei/p/10421159.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/278288.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

assistant字体_如何使用Google Assistant设置和致电家庭联系人

assistant字体Google谷歌Google Home and Nest smart speakers and displays allow you to make calls without using your phone. By setting up “Household Contacts,” anyone in your home can easily call friends and family members with Google Assistant-enabled dev…

php队列使用

由于项目中在修改产品的同时要同步关联水单,删单,客保 等等数据。所以不可能等待所有都执行完毕以后再给客户端反馈。所以自己用写了个队列。在这里晒出来代码,以供大家参考。(项目中用到的是tp,所以在这里用tp作为演示) 思路 1,需要用到队列…

Accoridion折叠面板

详细操作见代码&#xff1a; <!doctype html> <html><head><meta charset"UTF-8"><title></title><meta name"viewport" content"widthdevice-width,initial-scale1,minimum-scale1,maximum-scale1,user-scal…

skype快捷键_每个Skype键盘快捷键及其用法

skype快捷键Roberto Ricca/Shutterstock罗伯托里卡/ ShutterstockGet familiar with Skype’s unique keyboard shortcuts that will allow you to quickly change your settings, alter your interface, and control your communications. Use these hotkeys and become a Sky…

习惯需要坚持

近期会把本地的资料上传分享出来&#xff0c;好久没更新自己的内容了&#xff0c;以后会不断的更新哦。转载于:https://blog.51cto.com/haohao1010/2087494

YouTube键盘快捷键:速查表

Google’s video website wouldn’t be complete without all sorts of useful buttons and hidden commands that aren’t immediately obvious. Use this hotkey cheat sheet to quickly navigate YouTube and gain better control over your video browsing experience. 如果…

第五章 课本题目

例 5.1 使用单分支条件结构输出两个数的最大值。 #include<stdio.h> int main() { int a,b,max; scanf("%d,%d",&a,&b); if(a>b) maxa; if(a<b) maxb; printf("max%d\n",max); return 0; } 例 5.2 用双分支条件语句求最大值。 #includ…

MySQL服务读取参数文件my.cnf的规律研究探索

在MySQL中&#xff0c;它是按什么顺序或规律去读取my.cnf配置文件的呢&#xff1f;其实只要你花一点功夫&#xff0c;实验测试一下就能弄清楚&#xff0c;下面的实验环境为5.7.21 MySQL Community Server。其它版本如有不同&#xff0c;请以实际情况为准。 其实&#xff0c;MyS…

将组策略编辑器添加到控制面板

If you find yourself using the Group Policy Editor all the time, you might have wondered why it doesn’t show up in the Control Panel along with all the other tools. After many hours of registry hacking, I’ve come up with a registry tweak to let you do ju…

cookies和session区别

cookies和session区别 1、Cookie和Session都是会话技术&#xff0c;Cookie是运行在客户端&#xff0c;Session是运行在服务器端。 2、Cookie有大小限制以及浏览器在存cookie的个数也有限制&#xff0c;Session是没有大小限制和服务器的内存大小有关。3、Cookie有安全隐患&#…

Exchange Server 2016管理系列课件50.DAG管理之激活数据库副本

激活邮箱数据库副本是将特定被动副本指定为邮箱数据库的新主动副本的过程。我们将此过程称为数据库切换。数据库切换过程是指卸除当前的活动数据库&#xff0c;然后在指定的服务器上将相应的数据库副本作为新的活动邮箱数据库副本进行装载。成为活动邮箱数据库的数据库副本必须…

常见设计模式 (python代码实现)

1.创建型模式 单例模式 单例模式&#xff08;Singleton Pattern&#xff09;是一种常用的软件设计模式&#xff0c;该模式的主要目的是确保某一个类只有一个实例存在。当你希望在整个系统中&#xff0c;某个类只能出现一个实例时&#xff0c;单例对象就能派上用场。 比如&#…

记录一次解决httpcline请求https报handshake_failure错误

概述 当使用httpclinet发起https请求时报如下错误&#xff1a; javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failureat com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)at com.sun.net.ssl.internal.ssl.Alerts.getSSLExcep…

桌面程序explorer_备份Internet Explorer 7搜索提供程序列表

桌面程序explorerIf you are both an IE user and a fan of using custom search providers in your search box, you might be interested to know how you can back up that list and/or restore it on another computer. Yes, this article is boring, but we’re trying to…

C++内联函数(inline function)

c从c中继承的一个重要特征就是效率。假如c的效率明显低于c的效率&#xff0c;那么就会有很大的一批程序员不去使用c了。 在c中我们经常把一些短并且执行频繁的计算写成宏&#xff0c;而不是函数&#xff0c;这样做的理由是为了执行效率&#xff0c;宏可以避免函数调用的开销&am…

GreenPlum数据库故障恢复测试

本文介绍gpdb的master故障及恢复测试以及segment故障恢复测试。 环境介绍&#xff1a;Gpdb版本&#xff1a;5.5.0 二进制版本操作系统版本&#xff1a; centos linux 7.0Master segment: 192.168.1.225/24 hostname: mfsmasterStadnby segemnt: 192.168.1.227/24 hostname: ser…

书评:Just the Computer Essentials(Vista)

Normally we try and focus on articles about how to customize your computer, but today we’ll take a break from that and do a book review. This is something I’ve not done before, so any suggestions or questions will be welcomed in the comments. 通常&#x…

RxSwift笔记七其他操作符

简介 git地址: https://github.com/ReactiveX/RxSwift参考资料:http://t.swift.gg/d/2-rxswiftReactiveX是通过可观察的流实现异步编程的一种API&#xff0c;它结合了观察者模式、迭代器模式和函数式编程的精华&#xff0c;RxSwift 是 ReactiveX 编程思想的一种实现。 复制代码…

python学习

为了学会能学&#xff0c;不负时间&#xff0c;为了那简练的美&#xff01; 为了一片新天地。 /t 对齐 python : # 99乘法表i 0while i < 9 : i 1 j 0 while j < i : j 1 print(j ,* , i,"" , i*j , end\t) #空格不能对齐 制表符…

hey 安装_如何在助理扬声器上调整“ Hey Google”的灵敏度

hey 安装Vantage_DS/ShutterstockVantage_DS / ShutterstockThe Google Assistant is a useful tool that allows you to control your smart home, check the weather, and more. Unfortunately, the Assistant might not hear you in a noisy environment or it might activa…