Match every input sequence with its output when this program is run: String message = "" char d1=input() char d2=input() if(d1 == 'A') { + "I see message = message } else if(d1 == 'B') { message = message + "I love " } if(d2 == 'A') { message = message + "the world!" } else { message = message + "the moon!" } print message Match every input sequence with the output sequence produced when it is run using the program on the left. In: 'A', 'A' 1 Out: "the moon!" In: 'A', 'B' Out: "I see the world!" In: 'A', 'C' Out: "I love the world!" Out: "I see the moon!" In: 'B', 'A' Out: "the world!" In: 'B', 'B' Out: "I love the moon!" In: 'B', 'C' In: 'C', 'A' In: 'C', 'B' In: 'C', 'C'
Match every input sequence with its output when this program is run: String message = "" char d1=input() char d2=input() if(d1 == 'A') { + "I see message = message } else if(d1 == 'B') { message = message + "I love " } if(d2 == 'A') { message = message + "the world!" } else { message = message + "the moon!" } print message Match every input sequence with the output sequence produced when it is run using the program on the left. In: 'A', 'A' 1 Out: "the moon!" In: 'A', 'B' Out: "I see the world!" In: 'A', 'C' Out: "I love the world!" Out: "I see the moon!" In: 'B', 'A' Out: "the world!" In: 'B', 'B' Out: "I love the moon!" In: 'B', 'C' In: 'C', 'A' In: 'C', 'B' In: 'C', 'C'
Chapter7: Characters, Strings, And The Stringbuilder
Section: Chapter Questions
Problem 12RQ
Related questions
Question
Please answer correctly. Also, I attachs the answer option on the image as well.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
Knowledge Booster
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
Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr