Compile Error
/in/foo.c: In function 'main': /in/foo.c:7:3: error: 'cin' undeclared (first use in this function) cin>>m>>n; ^~~ /in/foo.c:7:3: note: each undeclared identifier is reported only once for each function it appears in /in/foo.c:17:2: error: 'cout' undeclared (first use in this function) 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;
}