/**
 * Class name: CtoFTable
 * A Java application to generate a table that shows all temperatures
 * between 0 and 100 degrees in Celsius, with an increment of one degree in
 * Celsius, in one column and the equivalent temperatures in Fahrenheit,
 * with an increment of 9/5 degrees in Fahrenheit, in another column.
 *
 * @author Katherine Johnson
 * @version 1.0, 10/07/2026
 */
public class CtoFTable {

  /**
   * Returns, given an temperature in Celsisu, the equivalent temperature
   * in Fahrenheit
   *
   * @param c - a temperature in Celsius
   * @return the equivalent temperature in Fahrenheit
   */
  public static double toFahrenheit(int c) {
    return c*(9.0/5.0) + 32;
  }

  /**
   * main() mathod
   */
  public static void main(String[] args) {
    System.out.printf("Celsius\tFahrenheit%n");
    for (int c = 0; c <=100; c++) {
      System.out.printf("%4d\t", c);
      System.out.printf("%7.2f%n", toFahrenheit(c));
    }
  }
  
}
