Calculate Cosine Value - C

Cosine Value

Snippet Code


  
Rate this page :
  [ 0 votes]

#include <math.h> #include <stdio.h> int main() { printf(<q>The cosine of %f is %f.n</q>,0.5,cos(0.5)); printf(<q>The cosine of %f is %f.n</q>,1.0,cos(1.0)); printf(<q>The cosine of %f is %f.n</q>,-1.0,cos(-1.0)); return 0; } } Output: ======= The cosine of 0.5 1

Tags


Ask Questions

Ask Question