Computers and Technology

18.41 Clone of LAB: Variables/Assignments: Simple statistics Part 1
Given 3 integers, output their average and their product, using integer arithmetic.

Ex: If the input is:

10 20 5
the output is:

11 1000
Submit the above for grading. Your program will fail the test cases (which is expected), until you complete part 2 below but check that you are getting the correct average and product using integer division.

Part 2
Using the same 3 integers, output the average and product, using floating-point arithmetic.

Output all floating-point numbers with five digits after the decimal point, which can be achieved as follows:
Put x to output with 5 decimal places

Ex: If the input is:

10 20 5
the first line of output uses integer arithmetic and the second line output uses floating-point arithmetic:

11 1000
11.66667 1000.00000

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:00, danthehero56
Which of the following is true of operations within a spreadsheet program’s built-in functions? a. operations within parentheses, then multiplication and division, and then addition and subtraction are computed. b. operations within parentheses, then addition and subtraction, and then multiplication and division are computed. c. multiplication and division, then addition and subtraction, and then operations within parentheses are computed. d. addition and subtraction, then multiplication and division, and then operations within parentheses are computed
Answers: 2
image
Computers and Technology, 22.06.2019 15:30, coollid876
To increase sales, robert sends out a newsletter to his customers each month, letting them know about new products and ways in which to use them. in order to protect his customers' privacy, he uses this field when addressing his e-mail. attach bcc forward to
Answers: 2
image
Computers and Technology, 23.06.2019 08:30, Bradgarner772
Based on your knowledge of a good network, describe what you think is a perfect network would be. what kind of information and resources could users share on this network. what would the network administrator do? what kind of communication would be used?
Answers: 1
image
Computers and Technology, 23.06.2019 21:00, shyshy1791
Which set of steps will organize the data to only show foods with more than 100 calories and rank their sugar content from greatest to least?
Answers: 1
Do you know the correct answer?
18.41 Clone of LAB: Variables/Assignments: Simple statistics Part 1
Given 3 integers, output...

Questions in other subjects: