Compile Error
/in/foo.cc: In function 'int main()': /in/foo.cc:7:3: error: 'cin' was not declared in this scope cin>>m>>n; ^~~ /in/foo.cc:17:2: error: 'cout' was not declared in this scope cout<<k*l/n; ^~~~
代码
#include <stdio.h>
int main()
{
printf("hello, world\n");
int m,n,r=0,k=0,l=0;
cin>>m>>n;
k=m;
l=n;
r=m%n;
while (r!=0)
{
m=n;
n=r;
r=m%n;
}
cout<<k*l/n;
return 0;
}