Question: Identify and correct the errors in each of the following pieces of code. a) if (age >= 65); System.out.println(Age is greater than or equal to
Identify and correct the errors in each of the following pieces of code.
a) if (age >= 65);
System.out.println("Age is greater than or equal to 65");
else System.out.println("Age is less than 65)";
b) int x == 1, total == 0;
while (x <= 10)
{
total ++x;
System.out.println(x);
}
c) while (x <= 100)
total += x;
++x;
d) while (y =! 0)
{
System.out.println(y);
Step by Step Solution
3.34 Rating (145 Votes )
There are 3 Steps involved in it
These pieces of code seem to be written in Java Lets analyze ... View full answer
Get step-by-step solutions from verified subject matter experts
