Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
Implement a method

public static void printSquares(int num) which creates an IntStream using the iterate method. The method prints to the console the first num squares. For instance, if num = 4, then your method would output 1, 4, 9, 16.
Note: You will need to come up with a function to be used in the second argument of iterate.