Answer:
See Explanation Below
Explanation:
The new code segment is
int feb = 28;
if ((year % 4) == 0 && (year % 100) != 0) // assume that year is an integer with a valid year value
{
System.out.println("This is a leap year");
feb = 29;
}
Assume year = 2020, the assigned value of feb is 29;
Reason below;
At line 2 of the new code segment, two conditions are tested both of which must be satisfied.
1. year % 4 == 0
2020 % 4 = 0
0 = 0 (True)
2. year % 100 != 0
2020 % 100 != 0
20 != 0 (True)
Since both conditions are true, the value assigned to feb will be 29 and
"This is a leap year" will be printed without the quotes
Answer:
barcode reader is the correct answer
Question 1:
4. it increases the number of employees
Question 2:
2. false
Question 3:
2. it causes great damage to the ozone layer
Question 4:
1. true