/** set up loops from exercise 12.6, Ni~no and Hosch
 */
public class Loops{

  // doesn't do much except set up loops
  public static void forLoops(){
    // exercise a
    for (int i=1; i<=10; i++){}

    // exercise b
    for (int i=0; i<=10; i++){}

    // exercise c
    for (int i=0; i<=10; i++){}

    // exercise d
    for (int i=0; i<=10; i+=2){}
  }

  // sets up while loops
  public static void whileLoops(){
    // exercise a
    int i = 1;
    while (i <= 10){ i++; }

    // exercise b
    i = 0;
    while (i <= 10){ i++; }

    // exercise c
    i = 0;
    while (i <= 10) { i++; }

    // exercise d
    i = 0;
    while (i <= 10) { i+=2; }
  }
}
    
      

