<gh_stars>1-10
package exercicios_instrucoes_de_controle_1;

import java.util.Scanner;

public class TamanhoQuadrado {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		
		System.out.print("Informe o tamanho do quadrado: ");
		int t = sc.nextInt();
		System.out.println();
		
		for (int i = 1; i <= t; i++) {
			System.out.print("* ");			
		}
		System.out.println();
		switch (t) {
			case 1:
				System.out.println("**");
				break;
			case 2:
				System.out.println("* *");
				break;
			case 3:
				System.out.println("*   *");
				break;
			case 4:
				System.out.println("*     *");
				System.out.println("*     *");
				break;
			case 5:
				System.out.println("*       *");
				System.out.println("*       *");
				System.out.println("*       *");
				break;
			case 6:
				System.out.println("*         *");
				System.out.println("*         *");
				System.out.println("*         *");
				System.out.println("*         *");
				break;
			case 7:
				System.out.println("*           *");
				System.out.println("*           *");
				System.out.println("*           *");
				System.out.println("*           *");
				System.out.println("*           *");
				break;
			case 8:
				System.out.println("*             *");
				System.out.println("*             *");
				System.out.println("*             *");
				System.out.println("*             *");
				System.out.println("*             *");
				System.out.println("*             *");
				break;
			case 9:
				System.out.println("*               *");
				System.out.println("*               *");
				System.out.println("*               *");
				System.out.println("*               *");
				System.out.println("*               *");
				System.out.println("*               *");
				System.out.println("*               *");
				break;
			case 10:
				System.out.println("*                 *");
				System.out.println("*                 *");
				System.out.println("*                 *");
				System.out.println("*                 *");
				System.out.println("*                 *");
				System.out.println("*                 *");
				System.out.println("*                 *");
				System.out.println("*                 *");
				break;
			case 11:
				System.out.println("*                   *");
				System.out.println("*                   *");
				System.out.println("*                   *");
				System.out.println("*                   *");
				System.out.println("*                   *");
				System.out.println("*                   *");
				System.out.println("*                   *");
				System.out.println("*                   *");
				System.out.println("*                   *");
				break;
			case 12:
				System.out.println("*                     *");
				System.out.println("*                     *");
				System.out.println("*                     *");
				System.out.println("*                     *");
				System.out.println("*                     *");
				System.out.println("*                     *");
				System.out.println("*                     *");
				System.out.println("*                     *");
				System.out.println("*                     *");
				System.out.println("*                     *");
				break;
			case 13: 
				System.out.println("*                       *");
				System.out.println("*                       *");
				System.out.println("*                       *");
				System.out.println("*                       *");
				System.out.println("*                       *");
				System.out.println("*                       *");
				System.out.println("*                       *");
				System.out.println("*                       *");
				System.out.println("*                       *");
				System.out.println("*                       *");
				System.out.println("*                       *");
				break;
			case 14:
				System.out.println("*                         *");
				System.out.println("*                         *");
				System.out.println("*                         *");
				System.out.println("*                         *");
				System.out.println("*                         *");
				System.out.println("*                         *");
				System.out.println("*                         *");
				System.out.println("*                         *");
				System.out.println("*                         *");
				System.out.println("*                         *");
				System.out.println("*                         *");
				System.out.println("*                         *");
				break;
			case 15:
				System.out.println("*                           *");
				System.out.println("*                           *");
				System.out.println("*                           *");
				System.out.println("*                           *");
				System.out.println("*                           *");
				System.out.println("*                           *");
				System.out.println("*                           *");
				System.out.println("*                           *");
				System.out.println("*                           *");
				System.out.println("*                           *");
				System.out.println("*                           *");
				System.out.println("*                           *");
				System.out.println("*                           *");
				break;
			case 16:
				System.out.println("*                             *");
				System.out.println("*                             *");
				System.out.println("*                             *");
				System.out.println("*                             *");
				System.out.println("*                             *");
				System.out.println("*                             *");
				System.out.println("*                             *");
				System.out.println("*                             *");
				System.out.println("*                             *");
				System.out.println("*                             *");
				System.out.println("*                             *");
				System.out.println("*                             *");
				System.out.println("*                             *");
				System.out.println("*                             *");
				break;
			case 17:
				System.out.println("*                               *");
				System.out.println("*                               *");
				System.out.println("*                               *");
				System.out.println("*                               *");
				System.out.println("*                               *");
				System.out.println("*                               *");
				System.out.println("*                               *");
				System.out.println("*                               *");
				System.out.println("*                               *");
				System.out.println("*                               *");
				System.out.println("*                               *");
				System.out.println("*                               *");
				System.out.println("*                               *");
				System.out.println("*                               *");
				System.out.println("*                               *");
				break;
			case 18:
				System.out.println("*                                 *");
				System.out.println("*                                 *");
				System.out.println("*                                 *");
				System.out.println("*                                 *");
				System.out.println("*                                 *");
				System.out.println("*                                 *");
				System.out.println("*                                 *");
				System.out.println("*                                 *");
				System.out.println("*                                 *");
				System.out.println("*                                 *");
				System.out.println("*                                 *");
				System.out.println("*                                 *");
				System.out.println("*                                 *");
				System.out.println("*                                 *");
				System.out.println("*                                 *");
				System.out.println("*                                 *");
				break;
			case 19:
				System.out.println("*                                   *");
				System.out.println("*                                   *");
				System.out.println("*                                   *");
				System.out.println("*                                   *");
				System.out.println("*                                   *");
				System.out.println("*                                   *");
				System.out.println("*                                   *");
				System.out.println("*                                   *");
				System.out.println("*                                   *");
				System.out.println("*                                   *");
				System.out.println("*                                   *");
				System.out.println("*                                   *");
				System.out.println("*                                   *");
				System.out.println("*                                   *");
				System.out.println("*                                   *");
				System.out.println("*                                   *");
				System.out.println("*                                   *");
				break;
			case 20:
				System.out.println("*                                     *");
				System.out.println("*                                     *");
				System.out.println("*                                     *");
				System.out.println("*                                     *");
				System.out.println("*                                     *");
				System.out.println("*                                     *");
				System.out.println("*                                     *");
				System.out.println("*                                     *");
				System.out.println("*                                     *");
				System.out.println("*                                     *");
				System.out.println("*                                     *");
				System.out.println("*                                     *");
				System.out.println("*                                     *");
				System.out.println("*                                     *");
				System.out.println("*                                     *");
				System.out.println("*                                     *");
				System.out.println("*                                     *");
				System.out.println("*                                     *");
				break;
			default:
				break;
		}		
		for (int k = 1; k <= t; k++) {
			System.out.print("* ");			
		}
		
		sc.close();
	}

}
