data types

One of the most common data types in all programming languages is Float; which represents decimal values. Programming declares variables and specifies the data types of these variables at the beginning of the program.

However, the output of an operation involving floating numbers might not necessarily be a floating number, depending on the order of the operations.

Answer the following questions:

  • What is the output from print 1.0 / 3? Why do you get this output?
  • What is the output from print 10 + 3 * 7? Why do you get this output?
  • What is the output from print (10 + 3) * 7? Why do you get this output?

Write an algorithm that, given two numbers, will compute the total and product of the two numbers.

Convert the algorithm into a Java™ program.

Document your answers in a Microsoft® Word document.

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.