1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Butoxors [25]
4 years ago
12

Suppose that the variables grade1, grade2, and grade3 are declared as follows:

Computers and Technology
2 answers:
wel4 years ago
6 0

Answer:

Option B (grade1 + grade2 + grade3) / 3.0

Explanation:

The most accurate result is calculated by the expression given in the option B.  This is because all the <em>grade1</em>, <em>grade2</em> and <em>grade3</em> variables are integer type and therefore we need to add a decimal point after divisor (e.g. 3.0) so that the decimal points of the result can be preserved.

For example:

(88 + 92 + 83) / 3.0  should result in 87.66666666666667

If we do  (88 + 92 + 83) / 3, the decimal points are truncated to 87.

The expression in option c, (double)((grade1 + grade2 + grade3) / 3), will result in 87 as the  (grade1 + grade2 + grade3) / 3 will be evaluated first prior to converting into double type.

The expression in option d and e are inaccurate as they don't calculate average of the three variables.  

Mnenie [13.5K]4 years ago
5 0
A; you have to add the grades to have the total and then divide by 3 because there are 3 variables. 
You might be interested in
What is custom software
Kobotan [32]
A custom sofware is a computer program or website written <span>specifically for your company,</span>
4 0
4 years ago
Read 2 more answers
Advantages and disadvantages of screen reading​
STatiana [176]
It can make ur eyes blind blind that’s a disadvantage
7 0
3 years ago
Read 2 more answers
Frame from one LAN can be transmitted to another LAN via the device is:_____.
andreyandreev [35.5K]

Answer:

B) Bridge.

Explanation:

LAN refers to a local area network in which the network of computer are interconnected in less than an area which is limited i.e. school, university, residence, office building, etc

It is used to share a common line of communication within a less geographic area.

In order to transmit one LAN to the another LAN, the device we called as a bridge

Therefore the correct option is B. bridge

3 0
3 years ago
All of the following are interpreted languages
cricket20 [7]

Answer:

True

Explanation: Python is mostly interpreted and python code is written in . py file is first compiled to what is called bytecode which is stored with a . pyc

5 0
3 years ago
What are the two parts of encoding a file?
kykrilka [37]

Answer:

its encoding and decoding

Explanation:

because say if were trying to upload a video to a website or edit the video that is called encoding decoding is when someone told you to find a secret message in a game and you solve it by decoding the game files to find the secret message that decoding

hope it helps

8 0
3 years ago
Other questions:
  • Level of comfort that people feel
    10·1 answer
  • g Define memory hierarchy. A. The rate at which information can be transferred from one place to another. B. Ordering storage sy
    8·1 answer
  • What do financial planning skills ultimately enable an individual to do?
    10·2 answers
  • How does design influence the product's function?
    5·1 answer
  • Write a function called prod_all that takes any number of arguments and returns their sum. Test the function by using these two
    10·1 answer
  • If you have 60fps on your laptop tell me one way you can go to 240fps
    14·2 answers
  • It is a JavaScript property used to call a function after a specified time, in milliseconds​
    9·2 answers
  • The web design teams of a company are working on designing websites for various companies, Pick the ideas that employ proper use
    13·1 answer
  • You are creating a query for a website. The query
    5·1 answer
  • The unit we use to measure bending moment is...<br> A kg<br> B N<br> C Nm<br> D MPa
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!