Example of a C program

The following example shows a simple z/OS® XL C program that converts temperatures in Celsius to Fahrenheit. You can either enter the temperatures on the command line or let the program prompt you for the temperature.

In this example, the main program calls the function convert() to convert the Celsius temperature to a Fahrenheit temperature and to print the result.