当前位置:网站首页>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;
}
边栏推荐
- Programming ideas are more important than anything, not more than who can use several functions, but more than the understanding of the program
- STM32 serial port usart1 routine
- Education is a pass and ticket. With it, you can step into a higher-level environment
- STM32 general timer 1s delay to realize LED flashing
- openEuler kernel 技術分享 - 第1期 - kdump 基本原理、使用及案例介紹
- I think all friends should know that the basic law of learning is: from easy to difficult
- Synchronization control between tasks
- An executable binary file contains more than machine instructions
- The third paper of information system project manager in soft examination
- When you need to use some functions of STM32, but 51 can't realize them, 32 naturally doesn't need to learn
猜你喜欢

Schematic diagram and connection method of six pin self-locking switch

Quelle langue choisir pour programmer un micro - ordinateur à puce unique

Working mode of 80C51 Serial Port

STM32 interrupt switch

Interruption system of 51 single chip microcomputer

单片机学到什么程度能找到工作,这个标准不好量化
![[CSDN] C1 training problem analysis_ Part II_ Web Foundation](/img/91/72cdea3eb3f61315595330d2c9016d.png)
[CSDN] C1 training problem analysis_ Part II_ Web Foundation

UCI and data multiplexing are transmitted on Pusch (Part V) -- polar coding

SCM career development: those who can continue to do it have become great people. If they can't endure it, they will resign or change their careers

There is no specific definition of embedded system
随机推荐
端午节快乐!—— canvas写的粽子~~~~~
内存数据库究竟是如何发挥内存优势的?
Oracle数据库 SQL语句执行计划、语句跟踪与优化实例
当你需要使用STM32某些功能,而51实现不了时, 那32自然不需要学
QT qcombobox QSS style settings
(1) 什么是Lambda表达式
I didn't think so much when I was in the field of single chip microcomputer. I just wanted to earn money to support myself first
[successful graduation] [1] - visit [student management information system]
Getting started with JMX, MBean, mxbean, mbeanserver
Gif image analysis drawing RGB to YUV table lookup method to reduce CPU occupancy
Blue Bridge Cup for migrant workers majoring in electronic information engineering
2021-10-27
2020-08-23
There is no shortcut to learning and development, and there is almost no situation that you can learn faster by leading the way
Mobile phones are a kind of MCU, but the hardware it uses is not 51 chip
openEuler kernel 技术分享 - 第1期 - kdump 基本原理、使用及案例介绍
Liquid crystal display
Seven sorting of ten thousand words by hand (code + dynamic diagram demonstration)
CEF下载,编译工程
2021-10-28