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]
3 years ago
12

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

Computers and Technology
2 answers:
wel3 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]3 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
Help me guys pleassssssssse​
Readme [11.4K]

Answer:

is there a word bank??

Explanation:

8 0
3 years ago
What port number is the well-known port used by web servers to distribute web pages to web browsers?question 3 options:?
stira [4]
This is port 80 for clear-text connections and 443 for encrypted (TLS) connections.
5 0
3 years ago
Suppose you've decided to write a function template that you expect to use in many different source files. Suppose, further, tha
Sladkaya [172]

Answer:

The Solution to the given question can be defined as follows:

Explanation:

Please find the complete question in the attachment file.

In this case, the compiler will try to correct the model type by both the form we used when we try and call the method with both the appropriate form variable. It type of function. Consequently, unless the function in another file is specified, the compiler cannot locate the digital strategy. The point to note here is that only when this code is used, the template code shall be compiled.

The construct component will therefore be efficient so in this case, its connection stage would fail. An undefined connection to the feature <function name> can constitute a possible error in this case. It rules, therefore, address the construction project problem. Furthermore, the template function throughout the main program is generally recommended. It can be solved alternatively because parameters of a template like <function name><type> could be specified throughout the CPP file.

8 0
2 years ago
here is an email written by Michelle to Pattie what is the main netiquette violation in sentence b ?​
Artyom0805 [142]

Answer:

Using unfamiliar abbreviations and acronyms

Explanation:

because he using RHFD and LTRE

4 0
3 years ago
What are the role, responsibilities, and required background of the production designer of a film?
IRISSAK [1]
There are many roles and responsibilities and required background for the production designer of a film. For a complte and detailed view of this career, visit the following website.
6 0
3 years ago
Other questions:
  • Webster defines risk as "the possibility of loss or injury". Therefore, driving a motor vehicle is a risk.
    12·1 answer
  • By Carl Sandburg
    6·1 answer
  • Does anyone know the point of gradpoint?
    8·1 answer
  • 4.17 LAB: Varied amount of input data ( C++)
    5·1 answer
  • Please help!<br><br> What is a non-iterative programming structure?
    11·1 answer
  • Can anyone help me this is due today :) <br> Thank you so much
    14·2 answers
  • Write an algorithm to find the average of three numbers: 10, 20, 30
    7·1 answer
  • What was revolutionary about Web 2.0?
    5·1 answer
  • Write code that outputs variable numCats. End with a newline.
    6·1 answer
  • Wi-Fi Protected Access (WPA) fixes critical vulnerabilities in the earlier wired equivalent privacy (WEP) standard. Understandin
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!