repl.it
@AZRIELGIESWEIN/

Practice 6

Java

No description

fork
loading
Files
  • Main.java
  • jdt.ls-java-project
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
class Main {
  public static void main(String[] args) {
    int w = (1);
    int l = (1);
    int t = (0);
    for( t= 2*(w+l); t<21;){
      for( w=1; w<10; w++){
        for( l=1; w+l<10; l++){
          t=2*(w+l);
          
        //for(int t = (2*w+l); t<201;){
        //int t = (2*w+l);
        
          System.out.println("Width:"+w);
          System.out.println("Length:"+l);
          System.out.println("Total Bricks:"+t);
          System.out.println("");
          //back
          
        }
      }
    }
  }
}

//              w>1 l>1 t<=200 t=2w+2l
?