#include using namespace std; void main() { //operator //operand //cout << "Hi Mom" << endl; //cout << 5 + 7 << endl; ////int width; ////int height; ////int length; ////cout << "This program will find the volume of a box." << endl; ////cout << "Width? "; ////cin >> width; //////buffer - temporary storage area ////cin.ignore(cin.rdbuf()->in_avail()); ////cout << "Height? "; ////cin >> height; ////cout << "Length? "; ////cin >> length; ////cout << "The volume of the box is " << width * height * length; int age; cout << "What is your age? "; cin >> age; if(age < 1) { cout << "You are an infant" << endl; } if(age < 4 && age >= 1) { cout << "You are a toddler" << endl; } if(age < 13 && age >= 4) { cout << "You are a child" << endl; } if(age < 18 && age >= 13) { cout << "You are a teen" << endl; } if(age < 30 && age >= 18) { cout << "You are a young adult" << endl; } if(age < 70 && age >= 30) { cout << "You are an adult" << endl; } if(age < 110 && age >= 70) { cout << "You are an old adult" << endl; } if(age >= 110 ) { cout << "You are dead" << endl; } cout << "Have a nice day" << endl; } ////////////11:00 class /////////////////////////////////// #include using namespace std; void main() { //operator //operand /*cout << "This is the day the Lord has made" << endl; cout << 5 + 3 << endl;*/ //int x = 0; //cin >> x; //cout << "You entered " << x << endl; /////////////////////////////////////////////////////////////////////////////// //int height; //int width; //int length; //cout << "This program will calculate the volume of a box" << endl; ////cin blocks for user input if there is nothing in the input stream ////buffer //cout << "Height? "; //cin >> height; //cout << "Width? "; //cin >> width; //cout << "Length? "; //cin >> length; //cout << "The volume of the box is " << length * width * height << endl; /////////////////////////////////////////////////////////////////////////////// int age; cout << "Age? "; cin >> age; if(age < 1 || age == 1000) { cout << "You are an infant" << endl; } //short circuit boolean expression if(age < 4 && age >=1 ) { cout << "You are a toddler" << endl; } if(age < 13 && age >=4) { cout << "You are a child" << endl; } if(age < 20 && age >=13) { cout << "You are a teen" << endl; } if(age < 34 && age >= 20) { cout << "You are a young adult" << endl; } if(age < 50 && age >= 34) { cout << "You are an adult" << endl; } if(age >= 50) { cout << "You are old" << endl; } cout << "Have a nice day" << endl; }