Skip to content

Jpx-lang/Temperature-jpx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

JPX Temperature Converter Example

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.


Features

The temperature converter example demonstrates several JPX concepts:

  • Reading user input
  • Performing arithmetic calculations
  • Using functions
  • Printing results to the terminal

Concepts Demonstrated

Variables

Used to store temperature values entered by the user.

Arithmetic Operations

Temperature conversion formulas require mathematical operations such as addition, subtraction, multiplication, and division.

Functions

The conversion logic can be organized into functions for cleaner and reusable code.

User Input

The program can receive temperature values from the user using the Scanner module.


Modules Used

This example may use the following JPX modules.

Scanner Module

Used to read input from the terminal.

[Scanner];

Temperature Conversion

The program can convert between common temperature units:

  • Celsius → Fahrenheit
  • Fahrenheit → Celsius
  • Celsius → Kelvin
  • Kelvin → Celsius

These conversions rely on standard temperature formulas.


Running the Example

  1. Install JPX from the official repository.
  2. Download or clone this example project.
  3. Run the program using the JPX runtime.

Example command:

jpx run temperature_converter.jpx

Learning Goal

This example helps beginners understand:

  • Basic JPX syntax
  • Working with numeric values
  • Writing reusable functions
  • Building small utility programs

Repository

Official JPX repository:

https://github.com/jpx-lang


License

This example follows the same license as the JPX language project.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors