当前位置:网站首页>An elegant program for Euclid‘s algorithm
An elegant program for Euclid‘s algorithm
2022-07-05 03:33:00 【大魔法师云中君】
// Euclid's algorithm for greatest common divisor
int euclidAlgorithm (int A, int B){
A=abs(A);
B=abs(B);
while (B!=0){
while (A>B) A=A-B;
B=B-A;
}
return A;
}
边栏推荐
- Port, domain name, protocol.
- FBO and RBO disappeared in webgpu
- El select, El option drop-down selection box
- Why are there fewer and fewer good products produced by big Internet companies such as Tencent and Alibaba?
- [groovy] groovy environment setup (download groovy | install groovy | configure groovy environment variables)
- SQL injection exercise -- sqli Labs
- Kubernetes - identity and authority authentication
- Basic knowledge of tuples
- LeetCode 237. Delete nodes in the linked list
- Jd.com 2: how to prevent oversold in the deduction process of commodity inventory?
猜你喜欢
Flume configuration 4 - customize mysqlsource
腾讯云,实现图片上传
C file in keil cannot be compiled
[groovy] string (string type variable definition | character type variable definition)
Sqoop command
New interesting test applet source code_ Test available
Redis6-01nosql database
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
Why are there fewer and fewer good products produced by big Internet companies such as Tencent and Alibaba?
Learning notes of raspberry pie 4B - IO communication (I2C)
随机推荐
端口,域名,协议。
FBO and RBO disappeared in webgpu
2. Common request methods
Single box check box
Linux Installation redis
Kuboard
Difference between MotionEvent. getRawX and MotionEvent. getX
Port, domain name, protocol.
[wp][入门]刷弱类型题目
Use of kubesphere configuration set (configmap)
Devtools的簡單使用
C file in keil cannot be compiled
In MySQL Association query, the foreign key is null. What if the data cannot be found?
Daily question 2 12
How to define a unified response object gracefully
Kbp206-asemi rectifier bridge kbp206
【做题打卡】集成每日5题分享(第三期)
Devtools的简单使用
线程基础知识
Anti debugging (basic principles of debugger Design & NT NP and other anti debugging principles)