Control flow
Boolean operator works on truth values (true and false). The boolean operators are:
&&
)||
)!
)Example usage:
if (true && true) {
// This will run because true and true equals true.
}
if (!true) {
// This will not run because the negation of true is false.
}
Write a program that takes a year number and prints out "leap year" if the number is either:
2000
leap year