/** * This program draws a rectangle of *s to the screen * * @author Stuart Hansen * @version October 23, 2002 * @revised by Erica Eddy * @revision date: October 2009 */ import java.util.*; public class RectangleOfStars { // The main program gets the number of rows and columns and // then uses a nested for loop to draw the rectangle public static void main (String [] args) { Scanner input = new Scanner(System.in); System.out.print("Enter the number of rows: "); int rows = input.nextInt(); System.out.print("Enter the number of columns: "); int cols = input.nextInt(); // Draw the rectangles for (int i=0; i