Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3 . 1 6 LAB: Simple statistics Part 1 Given 3 integers, output their sum, average, and product, using integer arithmetic. Ex: If the input

3.16 LAB: Simple statistics
Part 1
Given 3 integers, output their sum, average, and product, using integer arithmetic.
Ex: If the input is 10205, the output is:
35111000
Note: Integer division discards the fraction. Hence the average of 10205 is output as 11, not 11.6667.
Note: Remember to declare 3 integer variables
Submit the above for grading. Your program will fail the last test cases (which is expected), until you complete part 2 and 3 below.
Part 2
Also output the sum, average and product, using floating-point arithmetic.
Ex: If the input is 10205, the output is:
35111000
3511.66671000
Note that fractions aren't discarded.
Part 3
Finally, output the distance of each number from the average, using integer arithmetic.
Ex: If the input is 10205, the output is:
35111000
3511.66671000
196
In C++ code

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

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions