Question: Part 1 Evaluate the following expressionsanswers may be Boolean, integer or doubleWRITE THE RESULTING VALUES OF THE EXPRESSIONS NOT THE TYPE. Use the assignments below:

Part 1

Evaluate the following expressionsanswers may be Boolean, integer or doubleWRITE THE RESULTING VALUES OF THE EXPRESSIONS NOT THE TYPE. Use the assignments below:

int height = 20, width = 40;

height + width width / 2(SAMPLE) 40

width > height && height == 40(SAMPLE) False

a.(height % 5== 0) && (width % 4== 0)

b.(width % height == 0)

c.(width height) * (width + height)

d.(height * 2 <= width)

e.(width / 8) != (height / 2)

f.(width +height) % 9

g.(height + width / 8)

h.(height + width) / 8i.!(!(height >= 10) || (width > height * 2))

Part 2

Write an equivalent algorithm by converting the following into a nested IF structure

if (speed > 100 && distance > 0&& fuel > 20){cout << "Go!";}

Part 3

What is displayed by the following algorithm?

int a = -10;

int b = 100;

while (b > a)

{

a = a + 10;

b = b a;

cout << b *a << endl;

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!