Question: C# Question: Create a function that takes three integers from the input. The app will return the rounded average of these integers using only integer
C# Question:
Create a function that takes three integers from the input. The app will return the rounded average of these integers using only integer operations (e.g. integer division with / and modulus (the remainder operator) with %) to accomplish this, so do not use float, double, or decimal data types, functions, and operations.
If your numbers are 1, 2, 4, the rounded average is 7/3 or 2. However, if your numbers are 1, 2, 5, the rounded average is 8/3 or 3. Likewise, if your numbers are -1, -2, -4, the rounded average is -7/3 or -2; and if your numbers are -1, -2, -5, the rounded average is -8/3 or -3.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
