Example
Write a method that takes in as parameter N, the side of a square and prints and square of size N with asterisks.
void PrintSquare (int N) is the header.
//PRE: N is a value between 2 and 20
For invocation: PrintSquare(3);
Output is
***
***
***
Previous slide
Next slide
Back to first slide
View graphic version