Question: Jump to level 1 A polynomial is given by q = 5 . 0 n 2 + 9 . 5 n + 1 . 5

Jump to level 1
A polynomial is given by q=5.0n2+9.5n+1.5. Declare double variables n and q. Then, read n from input and compute q
using the polynomial.
Ex: If the input is 1.2, then the output is:
20.100
Note: n2 can be computed using *.
import java.util.scanner;
public class Polynomial {
public static void main(String[] args){
Scanner scnr = new Scanner(
System.in);
6
7
8
9
10
}
System.out.printf("%.3f
", q);
}
 Jump to level 1 A polynomial is given by q=5.0n2+9.5n+1.5. Declare

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!