当前位置:网站首页>is_ power_ of_ 2 judge whether it is a multiple of 2
is_ power_ of_ 2 judge whether it is a multiple of 2
2022-07-03 09:59:00 【Wukong is so timid】
bool is_power_of_2(int n) {
int i,j;
if(n<=0)
return false;
if(n==1)
return true;
while(n!=1)
{
if(n%2==0)
n=n/2;
else
return false;
}
return true;
}
边栏推荐
- STM32 general timer output PWM control steering gear
- The third paper of information system project manager in soft examination
- CEF download, compile project
- Stm32 NVIC interrupt priority management
- 2021-10-27
- QT qcombobox QSS style settings
- It is difficult to quantify the extent to which a single-chip computer can find a job
- 01 business structure of imitation station B project
- I think all friends should know that the basic law of learning is: from easy to difficult
- SCM is now overwhelming, a wide variety, so that developers are overwhelmed
猜你喜欢
万字手撕七大排序(代码+动图演示)
MYSQL数据库底层基础专栏
嵌入式本来就很坑,相对于互联网来说那个坑多得简直是难走
【力扣刷题笔记(二)】特别技巧,模块突破,45道经典题目分类总结,在不断巩固中精进
Basic knowledge of communication interface
Windows下MySQL的安装和删除
Fundamentals of Electronic Technology (III)__ Logic gate symbols in Chapter 5
Successful graduation [2] - student health management system function development...
UCI and data multiplexing are transmitted on Pusch (Part V) -- polar coding
Which language should I choose to program for single chip microcomputer
随机推荐
Oracle数据库 SQL语句执行计划、语句跟踪与优化实例
Gif image analysis drawing RGB to YUV table lookup method to reduce CPU occupancy
[male nanny style] teach you to open the first wechat applet
单片机职业发展:能做下去的都成牛人了,熬不动就辞职或者改行了
Sending and interrupt receiving of STM32 serial port
SSB Introduction (PbCH and DMRs need to be supplemented)
Successful graduation [3]- blog system update...
It is difficult to quantify the extent to which a single-chip computer can find a job
(2)接口中新增的方法
STM32 serial communication principle
Exception handling of arm
CEF下载,编译工程
2021-01-03
Basic knowledge of MySQL database (an introduction to systematization)
Comment la base de données mémoire joue - t - elle l'avantage de la mémoire?
Education is a pass and ticket. With it, you can step into a higher-level environment
CEF download, compile project
干单片机这一行的时候根本没想过这么多,只想着先挣钱养活自己
Learn the contents of 5g toolbox supporting NR through the NR resources provided by MATLAB
Application of external interrupts