Mega Code Archive

 
Categories / C / Code Snippets
 

How to use atan

#include <math.h> #include <stdio.h> int main(void) { double val = -3.0; do { printf("Arc tangent of %f is %f.\n", val, atan(val)); val += 0.1; } while(val<=2.0); return 0; }