Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Homework HelpRSS Feeds

PROGRAM USING COSINE FUNCTION

Posted By: Sophie Brown     Category: C Programming     Views: 8075

WRITE A PROGRAM USING COSINE FUNCTION.

Code for PROGRAM USING COSINE FUNCTION in C Programming

/*--------------- PROGRAM USING COSINE FUNCTION -------------- */
#include <math.h> #define PI 3.1416 #define MAX 180 main ( ) { int angle; float x,y; angle = 0; printf(“ Angle Cos(angle)\n\n”); while(angle <= MAX) { x = (PI/MAX)*angle; y = cos(x); printf(“%15d %13.4f\n”, angle, y); angle = angle + 10; } }
  
Share: 


Didn't find what you were looking for? Find more on PROGRAM USING COSINE FUNCTION Or get search suggestion and latest updates.

Sophie Brown
Sophie Brown author of PROGRAM USING COSINE FUNCTION is from London, United Kingdom.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!