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

Assignment Help:

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); 
}


Related Discussions:- Write a c program to compute the value of a sine wave

What are some ways try / catch / throw can develop software , Q: What are s...

Q: What are some ways try / catch / throw can develop software quality? A: By removing one of the reasons for if statements. The commonly utilized alternative to try / catch

Explain comments in c++, Comments Comments are integral part of every p...

Comments Comments are integral part of every program . Comments help in coding, debugging and maintaining a program . The compiler ignores them. They should be used liberally i

What should one catch?, A: By keeping along with the C++ tradition of "ther...

A: By keeping along with the C++ tradition of "there's more than one method to do that" (translation: "give programmers options & tradeoffs so they can choose what's best for them

C code, get coding for padovan string

get coding for padovan string

Decode, Problem Description Smugglers are becoming very smart day by day. N...

Problem Description Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new techn

Files, redirection in c++

redirection in c++

Compiler Design - Limit the methods, L is a text and can be composed of any...

L is a text and can be composed of any of the characters {, }, (, ) , and P, where P will represent the instruction. L will contain single spaced characters where each character

Difference between method overloading and method overriding, Overloading a ...

Overloading a method (or function) in C++ is the ability for functions of the similar name to be defined as long as these methods have dissimilar signatures (different set of param

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd