当前位置:网站首页>An elegant program for Euclid‘s algorithm
An elegant program for Euclid‘s algorithm
2022-07-05 03:44:00 【Grand mage yunzhongjun】
// 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;
}
边栏推荐
- SPI and IIC communication protocol
- ActiveReportsJS 3.1 VS ActiveReportsJS 3.0
- How can we truncate the float64 type to a specific precision- How can we truncate float64 type to a particular precision?
- Technology sharing swift defense programming
- Installation of postman and postman interceptor
- 英语必备词汇3400
- [wp][入门]刷弱类型题目
- [2022 repair version] community scanning code into group activity code to drain the complete operation source code / connect the contract free payment interface / promote the normal binding of subordi
- Accuracy problem and solution of BigDecimal
- When sqlacodegen generates a model, how to solve the problem that the password contains special characters?
猜你喜欢
51 independent key basic experiment
Operation flow of UE4 DMX and grandma2 onpc 3.1.2.5
Smart pointer shared_ PTR and weak_ Difference of PTR
Accuracy problem and solution of BigDecimal
postman和postman interceptor的安装
深度学习——LSTM基础
SQL injection exercise -- sqli Labs
Class inheritance in C #
[web Audit - source code disclosure] obtain source code methods and use tools
VM in-depth learning (XXV) -class file overview
随机推荐
Web components series (VII) -- life cycle of custom components
有個疑問 flink sql cdc 的話可以設置並行度麼, 並行度大於1會有順序問題吧?
SQL performance optimization skills
ABP vNext microservice architecture detailed tutorial - distributed permission framework (Part 2)
JWT漏洞复现
How about programmers' eyesight| Daily anecdotes
[software reverse analysis tool] disassembly and decompilation tool
Anti debugging (basic principles of debugger Design & NT NP and other anti debugging principles)
ActiveReportsJS 3.1 VS ActiveReportsJS 3.0
問下,這個ADB mysql支持sqlserver嗎?
Talk about the SQL server version of DTM sub transaction barrier function
[groovy] string (string injection function | asBoolean | execute | minus)
The architect started to write a HelloWorld
[groovy] loop control (number injection function implements loop | times function | upto function | downto function | step function | closure can be written outside as the final parameter)
Delphi free memory
Pdf things
NPM introduction link symbolic link
Logstash、Fluentd、Fluent Bit、Vector? How to choose the appropriate open source log collector
speed or tempo in classical music
[untitled]