网问答>>c++语言程序
问题
已解决

c++语言程序

时间:2019-10-13 00:07:34
怎么用整数类型为long long做这道题?
最佳回答
#include iostreamusing namespace std;int main(){long long n,m,nm,t,r;cinnm;nm=n*m;if(mn){ t=m; m=n; n=t;}r=m%n;while (r!=0){ m=n; n=r; r=m%n;}cout"最大公约数为"nendl;cout"最小公倍数为"nmnendl;return 0;}
时间:2019-10-13 00:07:37
本类最有帮助
Copyright © 2008-2013 www.wangwenda.com All rights reserved.冀ICP备12000710号-1
投诉邮箱: