This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //输入两个数,求最小公倍数和最大公约数 | |
| #include<stdio.h> | |
| int main(int argc, const char * argv[]) | |
| { | |
| int num1 = 0; | |
| int num2 = 0; | |
| int gcd = 0; //最大公约数 | |
| int lcm = 0; //最小公倍数 | |
| printf("请输入两个数:\n"); | |
| scanf("%d%d", &num1, &num2); |