/in/foo.c: In function 'main':
/in/foo.c:11:11: warning: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
int n = sqrt(x);
^~~~
/in/foo.c:11:11: warning: incompatible implicit declaration of built-in function 'sqrt'
/in/foo.c:11:11: note: include '<math.h>' or provide a declaration of 'sqrt'
/in/foo.c:20:4: error: 'cnt' undeclared (first use in this function)
cnt = cnt + 1;
^~~
/in/foo.c:20:4: note: each undeclared identifier is reported only once for each function it appears in