Which expressions for YYY and ZZZ correctly output the indicated ranges? Assume int x's value will be 0 or greater. Choices are in the form YYY / ZZZ. if(YYY){ // Output "0-29" } else if (ZZZ) { // Output "30-39" } else { // Output "40+" }     A. x < 29 / x >= 29 B. x < 30 / x >= 30 C. x < 30 / x < 40 D. x > 29 / x > 40

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 20PE: When you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making...
icon
Related questions
Question

This is in JAVA.

Which expressions for YYY and ZZZ correctly output the indicated ranges? Assume int x's value will be 0 or greater. Choices are in the form YYY / ZZZ.

if(YYY){
// Output "0-29"
}
else if (ZZZ) {
// Output "30-39"
}
else {
// Output "40+"
}
 
 
A. x < 29 / x >= 29
B. x < 30 / x >= 30
C. x < 30 / x < 40
D. x > 29 / x > 40
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps

Blurred answer
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