Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that demonstrates the approximate nature of floating point numbers. Finish the algorithm we started in class prior to class on Wednesday 3

Write a program that demonstrates the approximate nature of floating point numbers. Finish the algorithm we started in class prior to class on Wednesday 3 February. You will complete the assignment by implementing the algorithm in Java by 2359(Prior to midnight) Wednesday, 3 February.

Get floating point value from user display result of 1.0 / user input value display result of (1.0 / user input value) times user input value display result of (1.0 / user input value) times user input value -1 We discussed in class the use of the IPO chart to help define a solution.

/** *Input *----------- *floating point value *Process *------------ *define variables x and y *define variable product of x and y *define variable result of product - 1 *prompt user of floating point value *store user input into value of x *set y equal to 1.0/x *set product to x times y *set oneMinus equal to product minus 1 *Display product *Display x and y *Display product -1 * *Output *--------- *output product of x and y *output quotient of 1.0/x *output product of (x and y) -1 *output x and y */

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_2

Step: 3

blur-text-image_3

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 Processing

Authors: David M. Kroenke

12th Edition International Edition

1292023422, 978-1292023427

More Books

Students also viewed these Databases questions

Question

Sell the quality of your brand or products.

Answered: 1 week ago

Question

=+6 Who is the peer of the IA ?

Answered: 1 week ago

Question

=+herself to in terms of equity with regard to this assignment?

Answered: 1 week ago