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
Alchen [17]
3 years ago
7

Evaluate the expression. Be sure to list a value of appropriate type (e.g., 7.0 rather than 7 for a double, Strings in quotes).

19 / 2 / 2.0 + 2.5 * 6 / 2 + 0.5 * 4
Computers and Technology
1 answer:
Mashutka [201]3 years ago
6 0
<h2>Answer:</h2>

14.0

<h2>Explanation:</h2>

Using the level of precedence in Java,

From left to right;

(i) the first division operation will be done.

(ii)followed by the second division operation.

(iii)followed by the first multiplication operation.

(iv)followed by the third division operation.

(v)followed by the second multiplication operation.

(vi) followed by the first addition operation.

(vii)lastly followed by the second addition operation.

=================================================

Taking the steps above one after the other;

<em>(i) the first division operation will be done (i.e 19 / 2)</em>

=> Integer division in Java gives an integer result. Therefore, 19 / 2 = 9.5 will give 9.

So,

=><em> </em><u>19 / 2</u> / 2.0 + 2.5 * 6 / 2 + 0.5 * 4

=> 9 / 2.0 + 2.5 * 6 / 2 + 0.5 * 4

<em>(ii)followed by the second division operation. (i.e 9 / 2.0)</em>

=> From the result from step (i), the second division operation is now 9 / 2.0.

=> 9 / 2.0 = 4.5

So,

=> <u>9 / 2.0</u> + 2.5 * 6 / 2 + 0.5 * 4

=> 4.5 + 2.5 * 6 / 2 + 0.5 * 4

<em>(iii)followed by the first multiplication operation. (i.e 2.5 * 6)</em>

=> The first multiplication operation is given by 2.5 * 6

=> 2.5 * 6 = 15.0

So,

=> 4.5 + <u>2.5 * 6</u> / 2 + 0.5 * 4

=> 4.5 + 15.0 / 2 + 0.5 * 4

<em>(iv)followed by the third division operation. (i.e 15.0 / 2)</em>

=> The third division operation is given by 15.0 / 2

=> 15.0 / 2 = 7.5

So,

=> 4.5 + <u>15.0 / 2</u> + 0.5 * 4

=> 4.5 + 7.5 + 0.5 * 4

<em>(v)followed by the second multiplication operation. (i.e 0.5 * 4)</em>

=> The second multiplication operation is given by 0.5 * 4

=> 0.5 * 4 = 2.0

So,

=> 4.5 + 7.5 + <u>0.5 * 4</u>

=> 4.5 + 7.5 + 2.0

<em>(vi) followed by the first addition operation. (i.e 4.5 + 7.5)</em>

=> The first addition operation is given by 4.5 + 7.5

=> 4.5 + 7.5 = 12.0

So,

=> <u>4.5 + 7.5</u> + 2.0

=> 12.0 + 2.0

<em>(vii) lastly followed by the second addition operation. (i.e 12.0 + 2.0)</em>

=> The second addition operation is given by 12.0 + 2.0

=> 12.0 + 2.0 = 14.0

So,

=> <u>12.0 + 2.0</u>

=> 14.0

<em>Therefore, 19 / 2 / 2.0 + 2.5 * 6 / 2 + 0.5 * 4 = 14.0</em>

<h2>Note:</h2>

In Java, the order of precedence for arithmetic operators is;

=> /, * and %

=> followed by + and -

You might be interested in
Choose two technologies that you think would help the company meet its goals. Then fill in the chart below to compare the techno
elena55 [62]

Answer:

Good luck

Explanation:

Laptop and iPad

laptop because you can open many pages and tabs to help you multitask your goals

and iPad because most free business would be on an iPad and apps are cheap and would help you focus/help you work harder

7 0
3 years ago
Read 2 more answers
Use the Windows ________ to check on a nonresponsive program. Select one: A. Backup utility B. Task Manager C. System Restore D.
Nitella [24]
The answer is task manager. You can access it by pressing the Windows key and searching "task manager". You can also press ctrl+alt+delete or ctrl+shift+esc to access it.

Taskanager will show you all the applications currently running and how many resources they are using. If a task is unresponsive, it can be force closed from task manager.
4 0
3 years ago
Font size means the height of characters.<br>True<br>False​
svlad2 [7]
True..................
8 0
3 years ago
Which of the following keywords is used to remove a database table in Oracle? (Points : 2) DROP TABLE
juin [17]

Answer:

DROP TABLE

Explanation:

DROP TABLE is used to remove a database table in Oracle.

The syntax is DROP TABLE <TableName>;

For example: Suppose there is a table called Student in the database which needs to be removed. Then the administrator with the required privilege can issue with the following command:

DROP TABLE Student;

This is distinct from DELETE statement which is used to delete individual row or set of rows.

7 0
3 years ago
Which are examples of email client programs?<br> hand<br> are examples of email client programs.
goblinko [34]

Answer:

Please check the attachment,

Explanation:

Please check the attachment.

Download txt
4 0
3 years ago
Other questions:
  • The length, height, and width of a cube are 10, 7, and 5 cm respectively. Write a program that calculates the volume, perimeter,
    9·1 answer
  • A Windows systems administrator should use the Administrator account ________.a. As little as possible, and only when needed b.
    15·1 answer
  • Can someone explain a cylinder
    7·1 answer
  • Who is responsible for customer service?
    14·1 answer
  • Write a javascript program that reads three integers named start, end, and divisor from three textfields. your program must outp
    6·2 answers
  • Describe a hybird electrical vehical
    12·1 answer
  • Need help with Brainly!! Thanks in advance for sharing your thoughts or answering any of my questions on this. [][] Firstly, Bra
    14·1 answer
  • To override a method in a subclass, the method must be defined in the subclass using the same signature and compatible return ty
    12·1 answer
  • What would your leadership style be?
    14·1 answer
  • ____ takes care of the transport between machines. but it is unreliable, and there is no guarantee that any given packet will ar
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!