| 1 | // File: fig0618.cpp |
| 2 | // Computer Systems, Fourth Edition |
| 3 | // Figure 6.18 |
| 4 | |
| 5 | #include <iostream> |
| 6 | using namespace std; |
| 7 | |
| 8 | void printTri () { |
| 9 | cout << "*" << endl; |
| 10 | cout << "**" << endl; |
| 11 | cout << "***" << endl; |
| 12 | cout << "****" << endl; |
| 13 | } |
| 14 | |
| 15 | int main () { |
| 16 | printTri (); |
| 17 | printTri (); |
| 18 | printTri (); |
| 19 | return 0; |
| 20 | } |