当前位置:网站首页>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;
}

边栏推荐
- The latest blind box mall, which has been repaired very popular these days, has complete open source operation source code
- Kuboard
- The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
- Utilisation simple de devtools
- Basic knowledge of tuples
- 深度学习——LSTM基础
- 端口,域名,协议。
- VM in-depth learning (XXV) -class file overview
- LeetCode 234. Palindrome linked list
- Pat grade a 1119 pre- and post order traversals (30 points)
猜你喜欢

Subversive cognition: what does SRE do?

The latest blind box mall, which has been repaired very popular these days, has complete open source operation source code

Watch the online press conference of tdengine community heroes and listen to TD hero talk about the legend of developers

SQL performance optimization skills

Azkaban actual combat

How to define a unified response object gracefully
![Quick start of UI component development of phantom engine [umg/slate]](/img/8b/cee092ec1ab105a7e234143bd56861.jpg)
Quick start of UI component development of phantom engine [umg/slate]

LeetCode146. LRU cache

Port, domain name, protocol.

Design and practice of kubernetes cluster and application monitoring scheme
随机推荐
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
qrcode:将文本生成二维码
Use of kubesphere configuration set (configmap)
Basic knowledge of tuples
SQL injection exercise -- sqli Labs
Leetcode92. reverse linked list II
Sqoop命令
El tree whether leaf node or not, the drop-down button is permanent
[Yu Yue education] National Open University autumn 2018 8109-22t (1) monetary and banking reference questions
Tencent cloud, realize image upload
Three line by line explanations of the source code of anchor free series network yolox (a total of ten articles, which are guaranteed to be explained line by line. After reading it, you can change the
Leetcode42. connect rainwater
Usage scenarios and solutions of ledger sharing
Flex flexible layout
Pat class a 1160 forever (class B 1104 forever)
Tiny series rendering tutorial
Devtools的简单使用
[learning notes] month end operation -gr/ir reorganization
el-select,el-option下拉选择框
Learning notes of raspberry pie 4B - IO communication (I2C)