#include <stdio.h>

// Function prototypes
double toCelsius(double fahrenheit);
double toFahrenheit(double celsius);

// Function definitions
/**
 * Function Name: toCelsius
 * 
 * Function Block:
 * Converts a Fahrenheit temperature to its Celsius equivalent.
 * 
 * @param fahrenheit The temperature in Fahrenheit.
 * @return The equivalent temperature in Celsius.
 */
double toCelsius(double fahrenheit) {
    return (fahrenheit - 32) * 5.0 / 9.0;
}

/**
 * Function Name: toFahrenheit
 * 
 * Function Block:
 * Converts a Celsius temperature to its Fahrenheit equivalent.
 * 
 * @param celsius The temperature in Celsius.
 * @return The equivalent temperature in Fahrenheit.
 */
double toFahrenheit(double celsius) {
    return (celsius * 9.0 / 5.0) + 32;
}

int main() {
    // Print Celsius to Fahrenheit table
    printf("Celsius\t\tFahrenheit\n");
    for (int celsius = 0; celsius <= 100; celsius++) {
        printf("%d\t\t%.1f\n", celsius, toFahrenheit(celsius));
    }

    // Print Fahrenheit to Celsius table
    printf("\nFahrenheit\tCelsius\n");
    for (int fahrenheit = 32; fahrenheit <= 212; fahrenheit++) {
        printf("%d\t\t%.2f\n", fahrenheit, toCelsius(fahrenheit));
    }

    return 0;
}