subject

Given 4 integers, output their product and their average, using integer arithmetic.
Ex: If the input is:
8 10 5 4
the output is:
1600 6
Note: Integer division discards the fraction. Hence the average of 8 10 5 4 is output as 6, not 6.75.
Note: The test cases include four very large input values whose product results in overflow. You do not need to do anything special, but just observe that the output does not represent the correct product (in fact, four positive numbers yield a negative output; wow).
Also output the product and average, using floating-point arithmetic. Output each floating-point value with three digits after the decimal point, which can be achieved by executing cout << fixed << setprecision(3); once before all other cout statements.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:30
Which of the following examples has four beats in each measure?
Answers: 2
question
Computers and Technology, 24.06.2019 22:10
In command prompt, whats a command that will list only .ini files in c: \windows\system32 directory?
Answers: 1
question
Computers and Technology, 25.06.2019 00:30
Which of these serves as a bridge between the programming team and the audio team?
Answers: 2
question
Computers and Technology, 25.06.2019 11:30
What is a wiki farm? a.) a hosting service that allows you to build a wiki. b.) a collection of servers that store wiki search queries. c.) an association of wiki hosting companies. d.) a wiki created using environmentally friendly material.
Answers: 2
You know the right answer?
Given 4 integers, output their product and their average, using integer arithmetic.
Ex: If th...
Questions
question
English, 08.12.2021 08:20
question
Mathematics, 08.12.2021 08:30
question
Mathematics, 08.12.2021 08:30
question
English, 08.12.2021 08:30
question
French, 08.12.2021 08:30
question
Mathematics, 08.12.2021 08:30
Questions on the website: 13722363