求最大公约数
来源:互联网 发布:青岛建站seo 编辑:程序博客网 时间:2024/06/06 01:51
#include<stdio.h>
void main()
{
printf("请输入两个数:");
int m,n,r;
scanf("%d%d",&m,&n);
while(r!=0)
{
r=m%n;
m=n;
n=r;
}
printf("%5d",m);
}
void main()
{
printf("请输入两个数:");
int m,n,r;
scanf("%d%d",&m,&n);
while(r!=0)
{
r=m%n;
m=n;
n=r;
}
printf("%5d",m);
}
0 0
- 求最大公约数
- 求最大公约数
- 求最大公约数
- 求最大公约数
- 求最大公约数
- 求最大公约数
- 求最大公约数
- 求最大公约数
- 求最大公约数
- 求最大公约数
- 求最大公约数
- 求最大公约数
- 求最大公约数
- 求最大公约数
- 求最大公约数
- 求最大公约数
- 求最大公约数
- 求最大公约数
- python开发环境搭建
- 九九乘法表
- Android Design 笔记
- POJ 1269 Intersecting Lines
- matlab 做中值滤波时K = filter2(fspecial('average',3),J)/255,为什么要除以255
- 求最大公约数
- 1033. To Fill or Not to Fill
- 辛星解读iptables的常用参数及其值
- 创建和删除链表
- Received my new Lenovo Thinkpad X1 carbon
- 冒泡排序法
- 开窗函数,视图,事务,存储过程,索引,触发器,游标
- 【BZOJ2326】【HNOI2011】数学作业 分段矩阵乘法
- hdu 2874 Connections between cities