This project demonstrates how to build a Temperature Converter using the JPX programming language.
The program converts temperature values between different units such as:
- Celsius
- Fahrenheit
- Kelvin
This example is designed for beginners who want to understand how JPX handles user input, arithmetic calculations, functions, and program structure.
The temperature converter example demonstrates several JPX concepts:
- Reading user input
- Performing arithmetic calculations
- Using functions
- Printing results to the terminal
Used to store temperature values entered by the user.
Temperature conversion formulas require mathematical operations such as addition, subtraction, multiplication, and division.
The conversion logic can be organized into functions for cleaner and reusable code.
The program can receive temperature values from the user using the Scanner module.
This example may use the following JPX modules.
Used to read input from the terminal.
[Scanner];
The program can convert between common temperature units:
- Celsius → Fahrenheit
- Fahrenheit → Celsius
- Celsius → Kelvin
- Kelvin → Celsius
These conversions rely on standard temperature formulas.
- Install JPX from the official repository.
- Download or clone this example project.
- Run the program using the JPX runtime.
Example command:
jpx run temperature_converter.jpx
This example helps beginners understand:
- Basic JPX syntax
- Working with numeric values
- Writing reusable functions
- Building small utility programs
Official JPX repository:
This example follows the same license as the JPX language project.