Question: Identify and correct the errors in each of the following sets of code: a) while (c

Identify and correct the errors in each of the following sets of code:
a) while (c <= 5)
{
product *= c;
++c;

b) if (gender == 1)
{
Console.WriteLine("Woman");
}
else;
{
Console.WriteLine("Man");
}

Step by Step Solution

3.46 Rating (166 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a Error The closing right brace of the while statements ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Visual C How Program Questions!