Common Computer Science References
At the end of this lesson, you will be able to:
understand and use a nested if statement
compound Boolean statements
nil
create your own nested if statement program (note you must use a nested if statement) that will solve this problem:
determine if a year is a "leap year"
read this to get the rules and this
you can do this without nested if statements, BUT for this problem YOU MUST use a nested if
it is a leap year every 4 years
EXCEPT every 100 years it is not
EXCEPT every 400 years it is
% is modulus operator in most programming languages (7%2=1)
recreate the same above program in C
NOTE: You can turn on "Closed Captions" to see a printout of what is being said by selecting the "CC" button.
You can also have it translate the closed captions by going to "Settings, Subtitles/CC, Auto-translate" and then pick your prefered language.