Write a c program to compute the value of a sine wave, C/C++ Programming

Write a C program to compute the value of a sine wave from 0 to 2P with an increment of 0.1 radians.
 
#include stdio.h
#include math.h
#define pi 3.1415927
void main()
{
  char prompt;
  float x,y;
  for (x=0;x<=2*pi;x+=0.1)
  {
    y = sin(x);
    printf("The sin of %4.2f is %5.4f\n\r",x,y);
  }   
  printf("Press any key to exit \n\r");
  scanf("\n%c",&prompt); 
}

Posted Date: 4/16/2013 1:41:50 AM | Location : United States







Related Discussions:- Write a c program to compute the value of a sine wave, Assignment Help, Ask Question on Write a c program to compute the value of a sine wave, Get Answer, Expert's Help, Write a c program to compute the value of a sine wave Discussions

Write discussion on Write a c program to compute the value of a sine wave
Your posts are moderated
Related Questions
Question: (a) Write down the class 'ListNode' to contain the following:- (i) variable data of type Object (ii) variable next of type ListNode (iii)

Reference Oddities A reference variable can demote to any integer variable, be it in an array or a member variable from structure or class. Reference variables can demote to co

i need a program for finding the last fibonacci number

Friend for Overloading Operators Sometimes friend functions cannot be avoided. For example with the operator overloading. Consider the following class that have data members to

Description - The TR-069 CPE WAN Management Protocol (CWMP) is a protocol that was created by the Broadband Forum (formally the DSL Forum) which sets out a common method for CPE de

In the Byteland country a string "s" is said to super ascii string if and only if count of each charecter in the string is equal to its ascci value in the byteland country ascii co

write a program in c language to implement stacks in a single array

I want MODI method''s coding in c++ using all concepts of c++..please help me its my project work...

c program for boardcolouring

program of area under integration