This code in C is not compiling on Atom, but CodeBlocks is working normally.
#include <stdio.h>
#include <math.h>
int main(){
int a, b, hipotenusa, catetos;
printf("A: ");
scanf("%d", &a);
printf("B: ");
scanf("%d", &b);
catetos = (a * a) + (b * b);
hipotenusa = sqrt(catetos);
printf("Hipotenusa = %d", hipotenusa);
return 0;
}
Error:
gcc-make-run: Compile Error
/tmp/cc4PjTLW.o: in function 'main':
capitulo13.c(.text+0x86): undefined reference to 'sqrt'
collect2: error: ld return 1 exit status