/in/foo.c: In function 'num':
/in/foo.c:4:23: warning: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
for (int i = 1; i <= sqrt(nn); i++)
^~~~
/in/foo.c:4:23: warning: incompatible implicit declaration of built-in function 'sqrt'
/in/foo.c:4:23: note: include '<math.h>' or provide a declaration of 'sqrt'
/in/foo.c: In function 'main':
/in/foo.c:16:2: error: 'cin' undeclared (first use in this function)
cin >> n >> m;
^~~
/in/foo.c:16:2: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:26:2: error: 'cout' undeclared (first use in this function)
cout << num(nn) << endl;
^~~~
/in/foo.c:26:21: error: 'endl' undeclared (first use in this function)
cout << num(nn) << endl;
^~~~