import java.util.*;
import java.io.*;


/**
 * A miscellaneous collection of methods involving loops.
 */
public class Lab5 {

  /** 
   * Print the positive divisors of i, one per line. (3 is a divisor of 9,
   * for example.) Hint: use %.
   * @param i the number whose divisors will be printed.
   */
  public static void printDivisors(int i) {
  }

  /**
   * Return the number of spaces in s.
   * @param s the String in which to look for spaces.
   * @return the number of spaces in s.
   */
  public static int countSpaces(String s) {
    return 0;
  }

  /** 
   * Print the positive divisors of i on one line, separated by commas.
   * For example, given 6 it would print
   *
   *   1, 2, 3, 6
   *
   * @param i the number whose divisors will be printed.
   */
  public static void printDivisorsSeparated(int i) {
    
  }


  
  /** 
   * Return the line that contains the most spaces in br. You should call
   * countSpaces within your loop.
   *
   * @param br the input source.
   * @return the line in br containing the most spaces.
   */
  public static String mostSpaces(BufferedReader br) throws IOException {
    //note that br.readLine() reads next line of input as a String.
    //if there is no more lines, readLine() returns null

    return null;  
  }

  /** 
   * Return the line that contains the most spaces in br. You should call
   * countSpaces within your loop. Ignore any line followed by the line
   * "ignore". For example, given the input
   *
   *        Hi
   *        Mom how are you
   *        ignore
   *        how
   *        are
   *        you today?
   *        quit
   *
   * the method should return "you today?", because "Mom how are you" was
   * ignored.
   *
   * @param br the input source.
   * @return the non-ignored line in br containing the most spaces.
   */
  public static String mostSpacesCorrectible(BufferedReader br) throws IOException {
    return null;
  }

  /** 
   * Return a  bufferedreader connected to file "inp.txt".
   * *Do NOT change this method*. Just use it to get a 
   * sample BufferedReader needed
   * to test mostSpaces and mostSpacesCorrectible.
   *
   * For this to work, download file "inp.txt" and save it
   * in the same directory as this java file.
   * 
   * @return a sample BufferedReader
   */
  public static BufferedReader getSampleBR()  throws IOException {
    BufferedReader br = new BufferedReader(new FileReader("inp.txt"));
    return br;
  }
  

}
