Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 398 Weeks Ago, 4 Days Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Computer Science Posted 14 Sep 2017 My Price 8.00

numbers to multiplying

Java Programming

Create a program to create a program that adds the numbers 1/2 to itself and 1/3 to itself a large number of times using both types float and double. It is to then compare the values of adding the numbers to multiplying 1/2 and 1/3 times the number of times they were added.

The program must first add 1/2 and 1/3 using type float, and compare to the value obtain using multiplication instead of addition. It is to do this for the following values:

1.000

10,000

100,000

1,000,000

10,000,000

100,000,000

1,000,000,000

The program should do this using two nested loops. The outer loop determines the number of times to add and starts at a 1000 and increments by multiples of 10 up to a 1,000,000,000. The inner loop does the addition of the numbers 1/2 and 1/3. When the inner loop completes, output the two sums and the two products, and the differences between the sums and the products to check for rounding errors. Then continue the outer loop. Remember to clear your variables for the sums before the start of the inner loop.

Next the program repeats the above except that it uses type double instead of type float for the variables. This will require a second set of nested loops and different variables.

As always, have your name, the assignment number, and a brief description of the program in comments at the top, have comments in the program, use proper blocking, and make certain to test your program to verify that it is working properly.

Lastly, notice the values produced, do they make sense to you?

Answers

(5)
Status NEW Posted 14 Sep 2017 09:09 PM My Price 8.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll

Not Rated(0)