MCPcopy Create free account
hub / github.com/Hazrat-Ali9/Computer-Programming / main

Method main

Problem14.java:7–31  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

5public class Problem14 {
6
7 public static void main(String[] args) {
8 // TODO Auto-generated method stub
9 Scanner input = new Scanner(System.in);
10 int T = input.nextInt();
11
12 while (T < 1 || T > 25) {
13 T = input.nextInt();
14 }
15 int[] allT = new int[T];
16
17 for (int i = 0; i < T; i++) {
18 int n = input.nextInt();
19 while (n < 1 || n > 100) {
20 n = input.nextInt();
21 }
22 allT[i] = n;
23 }
24 input.close();
25
26 for (int i = 0; i < allT.length; i++) {
27 drawSquare(allT[i]);
28 System.out.println();
29 }
30
31 }
32
33 public static void drawSquare(int number) {
34 for (int i = 0; i < number; i++) {

Callers

nothing calls this directly

Calls 1

drawSquareMethod · 0.95

Tested by

no test coverage detected