Question: 1. Which expression best determines if double variable x is 95.1? Group of answer choices fabs(x - 95.1) > 0.0001 fabs(x - 95.1) < 0.0001

1. Which expression best determines if double variable x is 95.1?

Group of answer choices

fabs(x - 95.1) > 0.0001

fabs(x - 95.1) < 0.0001

fabs(x - 95.1) != 0.0001

x == 95.1

2. For which quantity is a double the best type?

Group of answer choices

Length of your left foot

Comments on a social media post

Chickens on a farm

People in a car

3. Which for loop will iterate (i.e., execute its body) 42 times?

Group of answer choices

for (i = 1; i < 42; i++)

for (i = 1; i < 41; i++)

for (i = 0; i < 42; i++)

for (i = 0; i < 41; i++)

4. A strange restaurant gives a discount for adults older than 51 if their age is a multiple of 3. Which expression evaluates to true if a discount should be given?

Group of answer choices

(age > 51) && (age % 3 == 0)

(age > 51) || (age % 3 != 0)

(age > 51) || (age % 3 == 0)

(age >= 51) && (age % 3 != 0)

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!