#include<stdio.h> int main(){ int a,b,m,n,t,r; scanf("%d%d",&a;&b); n=b; m=a; while(b!=0){ t=a%b; a=b; b=t; } r=m*n/a; printf("%d %d\n",r,t); } /* Main.c: In function 'main': Main.c:4:16: error: expected ')' before ';' token scanf("%d%d",&a;&b); ^ ) Main.c:4:11: warning: format '%d' expects a matching 'int *' argument [-Wformat=] scanf("%d%d",&a;&b); ~^ */ |
Double click to view unformatted code.