Another Question on Java programming

Joined
Sep 25, 2012
Messages
2
Reaction score
0
Write a program in Java that computes the trigonometric function sin(x) given by the
series
sin(x) = x – x3/3! + x5/5! – x7/7! + · · · .
The program should take as input a number from the command-line, and output the sine
value of that number.
 
Joined
Apr 25, 2017
Messages
260
Reaction score
35
Use Scanner class
Code:
Scanner input = new Scanner(System.in);
System.out.print("Please enter x value");
int x = input.nextInt();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Shoelace Formula 5
Java exercise 3
Register Question 0
Tasks 1
Fraction problem in beginner programming assignment (Java 8) 1
Java socket programming 1
Java Programming on DrJava 0
Pythen question 0

Members online

No members online now.

Forum statistics

Threads
474,264
Messages
2,571,065
Members
48,770
Latest member
ElysaD

Latest Threads

Top