C实例 Lcm C实例 hcf C实例 创建一个简单的链表 C实例 Lcm #include<stdio.h> int main() { int a, b, max, step, lcm; a = 3; b = 4; lcm = 0; if(a > b) max = step = a; else max = step = b; while(1) { if(max%a == 0 && max%b == 0) { lcm = max; break; } max += step; } printf("LCM is %d", lcm); return 0; } C实例 hcf C实例 创建一个简单的链表