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

Method main

Problem18.java:15–44  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

13 }
14
15 public static void main(String[] args) {
16 // TODO Auto-generated method stub
17 Scanner input = new Scanner(System.in);
18 int today = 1, n;
19
20 String[] answers;
21 int T = input.nextInt();
22
23 while (T < 1) {
24 T = input.nextInt();
25 }
26
27 answers = new String[T];
28
29 for (int i = 0; i < T; i++) {
30 n = input.nextInt();
31
32 while (n < 0) {
33 n = input.nextInt();
34 }
35
36 answers[i] = getColor(today + n);
37 }
38 input.close();
39
40 for (String answer : answers) {
41 System.out.printf("%s\n", answer);
42 }
43
44 }
45
46}

Callers

nothing calls this directly

Calls 1

getColorMethod · 0.95

Tested by

no test coverage detected