Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- How old are you? Are you an anchent or green? :D
- */
- #include <iostream>
- using namespace std;
- int main() {
- int age;
- cout << "Please enter you're age: ";
- cin >> age;
- while(age < 0) {
- cout << "Invalid age, your age has to be greater than 0" << endl;
- cin >> age;
- }
- if(age >= 21) {
- cout << "Well at least you old enough to dring so here's a beer!!!" << endl;
- } else if(age < 21 && age >= 18) {
- cout << "Congrats, you can smoke ciggaretts or cigars, join the military, get married, and vote." << endl;
- } else if(age < 18 && age >= 16) {
- cout << "Well, you can finally drive a car and get a part time job. So its time for you to pay rent." << endl;
- } else {
- cout << "A youngen eh, well at least you can get away with pretty much anything." << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement