Question: What does the following program segment display? int f = 7, s = 15; f = s % 2; if (f != 1) { f
What does the following program segment display?
int f = 7, s = 15;
f = s % 2;
if (f != 1)
{
f = 0;
s = 0;
}
else if (f == 2)
{
f = 10;
s = 10;
}
else
{
f = 1;
s = 1;
}
Console.WriteLine(" " + f + " " + s);
a. 7 15
b. 0 0
c. 10 10
d. 1 1
e. none of the above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
