/* linebreak.cpp * Anthony Larrain * csc309, spring 2006 * * Demonstrates default parameter syntax */ #include using namespace std; void linebreak(char symbol = '-', int colnumber = 80); /* Since the parameters in the declaration are optional * the above declaration could have been written as follows. * * void linebreak(char = '-', int = 80); * */ int main(){ linebreak(); linebreak('#'); linebreak('%',30); cout << endl; system("pause"); return 0; } void linebreak(char symbol, int colnumber){ for(int i = 0; i < colnumber; i++){ cout << symbol; } cout << endl; return; }