Given the following segment of code, what will be the output? int x = 5; if (x
Question:
Given the following segment of code, what will be the output?
int x = 5;
if (x == 2)
Write("Brown, brown, run aground. ");
else Write("Blue, blue, sail on through. ");
Write("Green, green, nice and clean.");
a. Brown, brown, run aground.
b. Blue, blue, sail on through.
c. Brown, brown, run aground. Blue, blue, sail on through.
d. Blue, blue, sail on through. Green, green, nice and clean.
e. none of the above
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
C# Programming From Problem Analysis To Program Design
ISBN: 9781285856872
5th Edition
Authors: Barbara Doyle
Question Posted: