Write a program to compute sin

Assignment Help JAVA Programming
Reference no: EM132095108

Please anwser using scilab notation thank you

Write a program to compute sin(x). The name of the program is dsin, and it accepts the user input - x - in degrees.

Your program converts x to radians, and uses taylor series to compute sin(x) within some defined accuracy.

The program has two versions; one version uses the ‘while' construct, and the other version uses the ‘for' construct.

Note:

• Taylor series approximates the sinusoidal function for -180 = x = 180 degrees (or -pi = x = pi). If your input is out of this range, your program must translate it to a value within the range.

• When you run dsin, it prompts; Enter angle in degrees:

• After you type desired angle, the result will return.

• You are not allowed to use the trigonometric functions provided by Matlab!

Reference no: EM132095108

Questions Cloud

Write pseudocode to calculate the income tax payable : Write pseudocode to calculate the income tax payable on any salary based on the tax scales shown below.
Which program has the better guarantee on running time : Programs A and B are analyzed and found to have worst-case running times no greater than and N2, respectively.
What is the equivalent unit of work done to date : During May 8000 units were completed and transferred out. What is the equivalent unit of work done to date for direct materials
The philosophy of reengineering an enterprise system : Describe the philosophy of reengineering an enterprise system.What is the difference between a transaction database and a data warehouse?
Write a program to compute sin : Write a program to compute sin(x). The name of the program is dsin, and it accepts the user input - x - in degrees.
What are the commands that you have to carry out : What are the commands that you have to carry out in order to turn a Java source code file into a running program?
Describe a sequence of stack operations : Describe a sequence of stack operations that results in S storing all elements originally in T below all of S's original element.
Evaluate the corporate-level strategy of victory : Evaluate the Corporate-Level Strategy of Victory Motorcycles to determine whether you believe the strategy is appropriate to offset forces in the industry.
What is sequenced activities flow : What is single activity flow? What is an example the textbook uses to explain this concept?What is "sequenced activities flow"?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Analyze some of the limitations a web designer should aware

Analyze some of the limitations a Web designer should be aware of before adding JavaScript to a Website. Determine if these limitations outweigh the benefits of using JavaScript. Explain your decision.

  Details of all advertisers registered with the service

Create a list of 6-7 different customers of both types with made-up details built in to the client program - display the details of all advertisers registered with the service,

  Write aprogram that reads lines from a file

Write aprogram that reads lines from a file and prints them out, removing all occurrences of a specifiedstring from the lines

  Create and test the program using eclipse

Change the file templates so that all the files you create have your name and student number in them, Create and test the program using eclipse

  Default constructor for the chatioexception class.

The second constructor takes in a string as a parameter and passes this string into the call to super();

  Implement a public class date that represents a date

The Date.java class. Implement a public class Date that represents a date composed of a month , day, and a year. Declare month, day, and year as integers.

  Calculate the shipping charge for a package

Write a program that will calculate the shipping charge for a package, based on its weight - Line up the answers vertically using the correct escape characters

  Determine values of the side of triangle

Enter 3 integers and determine if these 3 values make up the sides of a triangle. If any side is

  Demonstrate the worlds fastest human

Demonstrate the worlds fastest human. Your job is to take the top finish time given in seconds with two digits of precision to the right of the decimal point

  Write a very simple data maintenance java program

In this assignment, you will write a very simple data maintenance Java program for a small computer retail store (like Staples).

  History of java

Add a class FillInQuestion to the question hierarchy of How To 10.1. An object of this class is constructed with a string that contains the answer, surrounded by _ _, for example, "The inventor of Java was _James Gosling_". The question should be ..

  Design a simple pattern by using javascript

Design a simple pattern (lines, circle or whatever) which can change and iterate along with the sounds(music) by using JavaScript in openprocessing.

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