Commit 8ed40b9f authored by Trisha Gee's avatar Trisha Gee
Browse files

[Ch4] Puzzle 4

parent e9854241
Loading
Loading
Loading
Loading
+67 −0
Changes for src/main/java/ch4/Puzzle4.java: 67 added lines, 0 removed lines.
Original line number Diff line number Diff line
package ch4;

public class Puzzle4 {
  public static void main(String [] args) {
    ___________________________________
    int y = 1;
    int x = 0;
    int result = 0;
    while (x < 6) {
      ___________________________
      ___________________________
      y = y * 10;
      _________________
    }
    x = 6;
    while (x > 0) {
      _________________
      result = result + ___________________
    }
    System.out.println("result " + result);
  }
}

class ___________ {
  int ivar;
  ________  ______ doStuff(int _________) {
    if (ivar > 100) {
      return _________________________
    } else {
      return _________________________
    }
  }
}


//public class Puzzle4 {
//  public static void main(String [] args) {
//    ___________________________________
//    int y = 1;
//    int x = 0;
//    int result = 0;
//    while (x < 6) {
//      ___________________________
//      ___________________________
//      y = y * 10;
//      _________________
//    }
//    x = 6;
//    while (x > 0) {
//      _________________
//      result = result + ___________________
//    }
//    System.out.println("result " + result);
//  }
//}
//
//class ___________ {
//  int ivar;
//  ________  ______ doStuff(int _________) {
//    if (ivar > 100) {
//      return _________________________
//    } else {
//      return _________________________
//    }
//  }
//}
//