Name one example of a “decider” program that you regularly encounter in real life.
#include <iostream>
int main() {
// Step 1: Declare variables
int age;
// Step 2: Prompt user for input
std::cout << "Enter your age: ";
std::cin >> age;
// Step 3: Make a decision based on input
if (age >= 18) {
// Step 4a: Execute if condition is true
std::cout << "You are eligible to vote." << std::endl;
} else {
// Step 4b: Execute if condition is false
std::cout << "You are not eligible to vote yet." << std::endl;
}
// Step 5: End program
return 0;
}