Identify and correct the errors in each of the following pieces of code. [There may be more
Question:
Identify and correct the errors in each of the following pieces of code. [There may be more than one error in each piece of code.]
a) if (age >= 65);
{
Console.WriteLine("Age greater than or equal to 65");
}
else
{
Console.WriteLine("Age is less than 65)";
}
b) int x = 1, total;
while (x <= 10)
{
total += x;
++x;
}
c) while (x <= 100)
total += x;
++x;
d) while (y > 0)
{
Console.WriteLine(y);
++y;
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Question Posted: