i want to if Input size = 5 or Input size = 8
output screen need like this
Input size : 5
#
##
#.#
#..#
#####
or
Input size : 8
#
##
#.#
#..#
#...#
#....#
#.....#
########
but I don’t know how to write this code
package q4; import java.util.Scanner; public class Q4 { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Input size: "); int t = input.nextInt(); for (int n = 1; n <= t ; n++) line(n); } static void line(int n ) { String s = "#"; for (int a = 2; a < n ; a++) s += "."; s += "#"; System.out.println(s); } }