@GeorgeGibby/

Quick Maths

Java

No description

fork
loading
Files
  • Main.java
  • Numbers.txt
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import java.io.*;
import java.util.Scanner;

class Main {
  public static void main(String[] args) throws IOException{
    Scanner fileReader = new Scanner(new File("Numbers.txt"));
      while(fileReader.hasNext()) {
        int temp1 = fileReader.nextInt();
        int temp = (temp1-9)/4;
        if (temp == 0)
          System.out.print(" ");
        else if (temp == 1)
          System.out.print("A");
        else if (temp == 2)
          System.out.print("B");
        else if (temp == 3)
          System.out.print("C");
        else if (temp == 4)
          System.out.print("D");
        else if (temp == 5)
          System.out.print("E");
        else if (temp == 6)
          System.out.print("F");
        else if (temp == 7)
          System.out.print("G");
        else if (temp == 8)
          System.out.print("H");
        else if (temp == 9)
          System.out.print("I");
        else if (temp == 10)
          System.out.print("J");
        else if (temp == 11)
          System.out.print("K");
        else if (temp == 12)
          System.out.print("L");
        else if (temp == 13)
          System.out.print("M");
        else if (temp == 14)
          System.out.print("N");
        else if (temp == 15)
          System.out.print("O");
        else if (temp == 16)
          System.out.print("P");
        else if (temp == 17)
          System.out.print("Q");
        else if (temp == 18)
          System.out.print("R");
        else if (temp == 19)
          System.out.print("S");
        else if (temp == 20)
          System.out.print("T");
        else if (temp == 21)
          System.out.print("U");
        else if (temp == 22)
          System.out.print("V");
        else if (temp == 23)
          System.out.print("W");
        else if (temp == 24)
          System.out.print("X");
        else if (temp == 25)
          System.out.print("Y");
        else if (temp == 26)
          System.out.print("Z");
      }
    }
  }