#include<stdio.h> int main() { int m,n,j,t; scanf("%d %d",&n,&m); int a=n,b=m; if(m<n){ t=m; m=n; n=t; } while(m!=0){ r=n%m; n=m; m=r; } printf("%d %d",a*b/n,n); return 0; } /* Main.c: In function 'main': Main.c:13:3: error: 'r' undeclared (first use in this function) r=n%m; ^ Main.c:13:3: note: each undeclared identifier is reported only once for each function it appears in Main.c:4:10: warning: unused variable 'j' [-Wunused-variable] int m,n,j,t; ^ */ |
Double click to view unformatted code.