Rewrite the following switch statement as a nested if statement using a series of else. . .if

Question:

Rewrite the following switch statement as a nested if statement using a series of else. . .if statements:

string birdName;

switch (birdName)

{

case "Pelican":

WriteLine("Lives near water.");

break;

case "Cardinal":

WriteLine("Beautiful in the snow.");

break;

case "Owl":

WriteLine("Night creature.");

break;

case "Eagle":

WriteLine("Keen vision");

break;

case "Flamingo":

WriteLine("Pretty and pink.");

break;

default:

WriteLine("Can fly.");

break;

}

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: