1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
MaRussiya [10]
3 years ago
5

In this program we are going to practice using the Math class by computing some important values on the unit circle. Using the a

ngles 0, PI/2, and PI, print out the angle, the cosine of the angle, and the sine of the angle.
Computers and Technology
1 answer:
san4es73 [151]3 years ago
5 0

Answer:

The program in Java is as follows:

import java.lang.Math;

public class Trig{

public static void main(String args[]){

for(double angle = 0; angle <= Math.PI; angle += Math.PI / 2){

double cosX = Math.round(Math.cos(angle)*100.0)/100.0;

double sinX = Math.round(Math.sin(angle)*100.0)/100.0;

System.out.println((Math.round(angle*100)/100.0)+" --> "+cosX +" --> "+ sinX);

}}}

Explanation:

This line imports the math library into the program

import java.lang.Math;

This line defines a class

public class Trig{

This line defines the main method

public static void main(String args[]){

This line is an iteration that iterates from 0, through Math.PI using Math.PI/2 as an interval

for(double angle = 0; angle <= Math.PI; angle += Math.PI / 2){

This calculates the cosine of the angle (in radians)

double cosX = Math.round(Math.cos(angle)*100.0)/100.0;

This calculates the sine of the angle (in radians)

double sinX = Math.round(Math.sin(angle)*100.0)/100.0;

This prints the angle in radians, the cosine and the sine of the angle

System.out.println((Math.round(angle*100)/100.0)+" --> "+cosX +" --> "+ sinX);

}}}

You might be interested in
"Na2SO3” represents sodium sulfite.
STatiana [176]
There are four atoms
5 0
3 years ago
Read 2 more answers
To set up scenarios, you need to first use ______ to set up a list, then ______ to set up the reference cell. Last you need to u
Sholpan [36]

To set up scenarios, you need to first use Goal seek to set up a list, then data table  to set up the reference cell. Last you need to use  VLOOKUP to set up the cells that display the output results from the scenario.

<h3>What is a Goal Seek in Excel?</h3>

Microsoft Excel is known to have a goal seeking tool that is said to be built-in and it is one that gives room for the user to know the desired input value for any kind of  formula if the output value is said to be already known.

Hence, To set up scenarios, you need to first use Goal seek to set up a list, then data table  to set up the reference cell. Last you need to use  VLOOKUP to set up the cells that display the output results from the scenario.

See full question below

To set up scenarios, you need to first use to set up a list, then to set up the reference cell. Last you need to use to set up the cells that display the output results from the scenario. CHOOSE; VLOOKUP; data table Goal seek; data table; VLOOKUP Data validation; VLOOKUP; CHOOSE Data table; VLOOKUP;

Learn more about  VLOOKUP from

brainly.com/question/14042837

#SPJ1

6 0
2 years ago
What is the purpose of a mail merge field?
Alex73 [517]

Answer:

to set up placeholders in a document where data will be inserted

4 0
3 years ago
Read 2 more answers
Picture question please help me
cluponka [151]

Answer:

where is the picture?????

6 0
3 years ago
Read 2 more answers
Question 4 1 pts The following code could be rewritten using: if (x &gt; 12): if (x &lt; 34):​
artcher [175]

Answer:

if(x>12 || x<34)

Explanation:

Mashing the two together using the or '||' operator would allow to run both necessary functions for the next code.

7 0
2 years ago
Other questions:
  • Which markup language would be considered the most current for web design? HTLM, HTML5, XHTLM, XHTML 6
    14·2 answers
  • Integrated circuits are made up of _____ that carry the electrical current.
    14·1 answer
  • Does anyone know the point of gradpoint?
    8·1 answer
  • Which of the following is not a hazard a driver might encounter?
    5·1 answer
  • Does anyone know the answers?
    8·1 answer
  • What is a Software that interprets commands drom the keyboard and mouse
    13·1 answer
  • Which common online presentation medium do people use to present their own articles?
    8·2 answers
  • Pls help! for computers edge 2021
    7·1 answer
  • . A binary search has a right subtree but no left subtree. What noes contains that least element in the tree
    11·1 answer
  • Can you exclude header rows from sort in excel?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!