//
//  main.cpp
//  Assignment #0
//
//  This code implements a check to see if a user is old enough to vote
//

#include <iostream>

int main(int argc, const char * argv[]) {
    // Allocate a local variable to store the age entered by the user
    int age;

    // Output the required prompt
    std::cout << "VOTER CHECK" << std::endl;
    std::cout << "How old are you?" << std::endl;

    // Read in the age
    std::cin >> age;

    // Check to see if the age is 18 or higher
    if (age >= 18) {
      // yes, let the user know they can vote
      std::cout << "Congratulations!  You can vote!" << std::endl;
    } else {
      // no, apologize to the user and let them know they can't vote
      std::cout << "I'm sorry, you are not allowed to vote" << std::endl;
    }
    
    return 0;
}
