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

Assignment question, : Write a program that prompts the user to enter five...

: Write a program that prompts the user to enter five digit positive numbers. The program then outputs the digits of the number one digit per line. Eg if the user enters 32456, th

Miniumshelf, write a prgm to find minimum total number of shelves including...

write a prgm to find minimum total number of shelves including the intial one required for loading process

Bubble sort, sample of program that use in bubble sort using assignment ope...

sample of program that use in bubble sort using assignment operator in c++

Palindrome, A palindrome is a string that reads the same from both the ends...

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

Use of random function - c program , Use of random function: int main(...

Use of random function: int main(void) {    int i,j;         for(j=0;j       {      // randomize();       for(i=0;i                  printf("%d\n", ran

Develop a telephone billing system, Project Description: My project is a...

Project Description: My project is about telephone billing system. This project was my project in my college life. The project is quite easy, i needed C++ programming language..

Flowcharts, push and pop operation using array draw flowcharts

push and pop operation using array draw flowcharts

Function that has two int parameters number , Write a function that has two...

Write a function that has two int parameters num and n, and returns TRUE when the nth bit in num is 1, otherwise FALSE. This function should use the function in the above problem.

What does odbc do in context with php, What does ODBC do in context with PH...

What does ODBC do in context with PHP? PHP supports many databases such as dBase, Microsoft SQL Server, Oracle, etc. however, it also supports databases such as filePro, FrontB

Big-m method, big-m method operation reseach in progrmme c++..

big-m method operation reseach in progrmme c++..

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