This homework focuses on mastering basic if statements - the foundation of decision making in C programming. You'll build 6 different programs that make decisions based on user input.
Goal: Get comfortable with if statements before we move to if-else in Session 8!
Help people decide what to wear based on temperature!
Asks for a temperature and tells the user whether it's hot or cold, suggesting appropriate clothing.
Determine if a number is positive, negative, or zero!
Takes a number from the user and classifies it as positive, negative, or zero using multiple if statements.
Check if someone is old enough to vote!
Asks for a person's age and determines if they can vote (18 or older) or are too young.
Determine if a number is even or odd using the modulo operator!
Uses the modulo operator (%) to check if a number is divisible by 2, determining if it's even or odd.
Create a basic security system with password verification!
Asks for a password and grants or denies access based on whether the correct password (1234) is entered.
Check if a test score is passing or failing!
Takes a test score and determines if the student passed (60 or above) or needs to study more.
Ready to go the extra mile? Try these enhancements: