Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A polynomial is given by p = - 4 . 5 m 2 - 3 . 5 m + 3 . 0 . Declare double

A polynomial is given by p=-4.5m2-3.5m+3.0. Declare double variables m and p. Then, read m from input and compute p using the polynomial.
Ex: If the input is 2.0, then the output is:
-22.000
Note: m2 can be computed using *
import java.util.Scanner;
public class Polynomial {
public static void main(String[] args){
Scanner scnr = new Scanner(
System.in);
double m;
double p;
p=(-4.5**(m**m))-(3.5**m)+3.0;
}
System.out.printf("%.3f
", p);
}
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Horse Betting The Road To Absolute Horse Racing 2

Authors: NAKAGAWA,YUKIO

1st Edition

B0CFZN219G, 979-8856410593

More Books

Students also viewed these Databases questions