By Matt N; heres a example of making code shorter: #include using namespace std; int main() { cout << "Hello" << endl; cout << "Hello" << endl; cout << "Hello" << endl; cout << "Hello" << endl; cout << "Hello" << endl; cout << "Hello" << endl; cout << "Hello" << endl; cout << "Hello" << endl; cout << "Hello" << endl; cout << "Hello" << endl; return(0); } Outputs: Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello You can make that code alot faster, more efficient and flexable by doing it like this: #include using namespace std; void HelloFriend() { for(int i = 0; i <= 10; i++) { cout << "Hello" << endl; } } int main() { HelloFriend(); return(0); } Outputs: Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Shorter and better! Lets explain: i = 0, thats simple enough, i <= 10 means if i is less or equal to 10, i++ means add 1. so if i = 0, i++ will make it 1, and so on. Now this is how it works, if i is less or equal to 10 output Hello, else, nothing. So each time it outputs hello i's value increases by 1 making it closer to ten, once it becomes 11 its no longer equal or less than 10 therefore stopping.