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
A junior network administrator tells you that he can ping a DNS server successfully using its IP address, but he has not tested
Cerrena [4.2K]

Answer:

I would suggest "nslookup" utility on command line.

Explanation:

nslookup is a network administration command line tool and it is aimed for querying the Domain Name System to get domain name.

The nslookup command queries DNS servers and shows information about any DNS records.

Therefore, to test domain name lookups, one should use nslookup command.

3 0
3 years ago
In 2–4 sentences, describe how you would center text.
Arada [10]
<p style="text-align: center">Some text</p>
5 0
3 years ago
What are the biggest problems facing the criminal justice system in the area of computer crime
olchik [2.2K]

Answer:

1. Drug abuse

2. The criminal justice system and the Youths

3. High imprisonments

Explanation: Drug abuse is a major cause of computer crime as most computer crime have been linked with drug abuse.

Most of the people involved in computer crime are youths and young adults. The criminal justice system has to check better ways of managing the Youths involved.

The high level of imprisonments which continuously affects the correctional process and facilities.

5 0
4 years ago
Read 2 more answers
Which sentence is an example of an I-statement?
g100num [7]
Where are the answer choices?
3 0
3 years ago
Which of the following is a benefit, as well as a risk, associated with client/server networks?
melomori [17]
A. IT professional, who maintains the network, must be added and removed from the network. - risk 
B. Clients work independently; therefore, if one computer is not working, other computers can still do their jobs.  - benefit (scalability is always a benefit)
C. Security levels are set up by individuals; therefore, these networks may not be as secure. - risk
D. There is no need for a big IT department to keep the network up and running. - benefit (it is simple for maintenance)
7 0
4 years ago
Read 2 more answers
Other questions:
  • The _____ text wrapping option wraps text around the object, with the text forming to the shape of the object.
    14·1 answer
  • An empty frame used to reserve space for a picture to be inserted at a later time is know as what
    6·1 answer
  • In cell e9, enter a formula that calculates the session fee for a member. members receive a member discount off the non-member s
    9·1 answer
  • What is an unknown network called
    6·1 answer
  • The part of a computer that provides access to the internet
    6·1 answer
  • Which do switches create?<br> Networks<br> Wireless access points<br> Routes<br> Collision domains
    5·1 answer
  • What is the useful chart used for comparing values over categories?​
    8·1 answer
  • To use a macro, a user must first <br> ____ a macro and then <br> ____the macro.
    8·1 answer
  • Complete the sentence.
    8·2 answers
  • Write aemail to brother for laptop for vitrual classes​
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!