码迷,mamicode.com
首页 > 其他好文 > 详细

最大公约数

时间:2020-12-21 11:13:24      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:ret   int   return   printf   code   std   include   公约数   clu   

#include <stdio.h> int main() { int m = 24; int n = 18; int r = 0; while (m%n) { r = m % n; m = n; n = r; } printf("%d\n", n); return 0; }

最大公约数

标签:ret   int   return   printf   code   std   include   公约数   clu   

原文地址:https://blog.51cto.com/15057883/2564539

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!