Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() // Most important part of the program!
- {
- int age; // Need a variable...
- cout<<"Please input your age: "; // Asks for age
- cin>> age; // The input is put in age
- cin.ignore(); // Throw away enter
- if ( age < 10 ) { // If the age is less than 100
- cout<<"You are pretty young!\n"; // Just to show you it works...
- }
- else if ( age < 50 ) { // I use else just to show an example
- cout<<"You are an Adult!\n"; // Just to show you it works...
- }
- else if { age < 100 ) (
- cout<<"You can recive Health Benifits!\n"; // Executed if no other statement is
- }
- else (
- cout<<"Get a Life!\n";
- )
- cin.get();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement