Skip to content

SyafaHadyan/unit-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unit Converter

This is a command-line unit converter that currently supports temperature, weight, length, time, and data conversion. More conversions may be added in the future.

Usage

  1. Run the program.
  2. Select the unit to convert by entering its corresponding letter.
  3. Enter the value of the unit to convert.
  4. The program will display the converted values.

The program will loop indefinitely until you press Q.

Available Units

Temperature

  • (C) Celsius
  • (F) Fahrenheit
  • (K) Kelvin

Weight

  • (CT) Carat
  • (DWT) Pennyweight
  • (G) Gram
  • (GR) Grain
  • (HWT) Hundredweight
  • (KG) Kilogram
  • (LB) Pound
  • (LT) Long Ton
  • (MG) Milligram
  • (MT) Metric Ton
  • (OZ) Ounce
  • (ST) Stone
  • (TL) Troy Ounce
  • (TON) Ton

Length

  • (M) Meter
  • (KM) Kilometer
  • (CM) Centimeter
  • (MM) Millimeter
  • (MC) Micrometer
  • (NM) Nanometer
  • (MI) Mile
  • (YD) Yard
  • (FT) Foot
  • (IN) Inch
  • (NAUT) Nautical Mile
  • (LIGHT) Light Year

Time

  • (S) Second
  • (MS) Millisecond
  • (US) Microsecond
  • (NS) Nanosecond
  • (PS) Picosecond
  • (MIN) Minute
  • (HR) Hour
  • (DAY) Day
  • (WK) Week
  • (MON) Month
  • (YR) Year
  • (DEC) Decade
  • (CEN) Century
  • (MIL) Millenium

Data

  • (B) Byte
  • (KB) Kilobyte
  • (MB) Megabyte
  • (GB) Gigabyte
  • (TB) Terabyte
  • (PB) Petabyte
  • (EB) Exabyte
  • (ZB) Zettabyte
  • (YB) Yottabyte
  • (BIT) Bit
  • (KIB) Kibibyte
  • (MIB) Mebibyte
  • (GIB) Gibibyte
  • (TIB) Tebibyte
  • (PIB) Pebibyte
  • (EIB) Exbibyte
  • (ZIB) Zebibyte
  • (YIB) Yobibyte

Example Usage

Start the program simply by double-clicking the .exe file or use .\main.exe

(T) Temperature

(W) Weight

(L) Length

(TI) Time

(D) Data

Select unit: d

(B) Byte


(KB) Kilobyte


(MB) Megabyte


(GB) Gigabyte


(TB) Terabyte


(PB) Petabyte


(EB) Exabyte


(ZB) Zettabyte


(YB) Yottabyte


(BIT) Bit


(KIB) Kibibyte


(MIB) Mebibyte


(GIB) Gibibyte


(TIB) Tebibyte


(PIB) Pebibyte


(EIB) Exbibyte


(ZIB) Zebibyte


(YIB) Yobibyte

Enter Unit: kib
Enter data: 8


Byte: 8192
Kilobyte: 0.0078125
Megabyte: 7.62939e-06
Gigabyte: 7.45058e-09
Terabyte: 7.27596e-12
Petabyte: 7.10543e-15
Exabyte: 6.93889e-18
Zettabyte: 6.77626e-21
Yottabyte: 6.61744e-24
Bit: 65536
Mebibyte: 0.0078125
Gibibyte: 7.62939e-06
Tebibyte: 7.45058e-09
Pebibyte: 7.27596e-12
Exbibyte: 7.10543e-15
Zebibyte: 6.93889e-18
Yobibyte: 6.77626e-21


(T) Temperature

(W) Weight

(L) Length

(TI) Time

(D) Data

Select unit: q

Note that the program will loop indefinitely until you press Q.