Iven the code fragment below with nested if statements, rewrite the code to combine all the tests into one if statement with multiple conditionals. Paste (or type) the rewritten code into your answers document.
int feb = 28;
if ((year % 4) = = 0) / / assume that year is an integer with a valid year value
{
if ((year % 100) ! = 0)
{
System. out. println ("This is a leap year");
feb = 29;
}
}
If the value of year is 2020, what will the value of feb be after this code runs?
+1
Answers (2)
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Iven the code fragment below with nested if statements, rewrite the code to combine all the tests into one if statement with multiple ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Home » Computers and Technology » Iven the code fragment below with nested if statements, rewrite the code to combine all the tests into one if statement with multiple conditionals. Paste (or type) the rewritten code into your answers document.