Mega Code Archive

 
Categories / C / Code Snippets
 

Get the square root

#include <stdio.h> #include <math.h> /* needed by sqrt() */ int main(void) { double answer; answer = sqrt(23.0); printf("%f", answer); return 0; }