4) Trace the evaluation of the expressions and give the resulting values. (Make sure to give a value of the appropriate type, such as including a .0 at the end of a double) a) 8/5+17/2/3.0 ANSWER: = 1 + 8/3.0 = 1 + 2.0 = 1.2 b) 100.0/2/4 ANSWER: = 50.0/4 = 12.5 c) (12+6)/4*2 ANSWER: = 18/4 *2 = 4*2 = 8 5*7% 4+ "Hi” + 17 ANSWER: d)

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter12: Points, Classes, Virtual Functions And Abstract Classes
Section: Chapter Questions
Problem 2SA
icon
Related questions
Question
How do you do 4d)? JAVA
4) Trace the evaluation of the expressions and give the resulting values. (Make
sure to give a value of the appropriate type, such as including a .0 at the end
of a double)
a)
8/5 + 17/2/3.0
ANSWER: = 1 + 8/3.0
= 1 + 2.0
= 1.2
b)
100.0/2/4
ANSWER:: = 50.0 / 4
= 12.5
(12+6)/4 * 2
ANSWER: = 18/4 *2
= 4*2
= 8
5*7% 4+ "Hi" + 17
ANSWER:
Ô
d)
Transcribed Image Text:4) Trace the evaluation of the expressions and give the resulting values. (Make sure to give a value of the appropriate type, such as including a .0 at the end of a double) a) 8/5 + 17/2/3.0 ANSWER: = 1 + 8/3.0 = 1 + 2.0 = 1.2 b) 100.0/2/4 ANSWER:: = 50.0 / 4 = 12.5 (12+6)/4 * 2 ANSWER: = 18/4 *2 = 4*2 = 8 5*7% 4+ "Hi" + 17 ANSWER: Ô d)
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Datatypes
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning