Skip to content

agunbuhori/rupiah

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rupiah Redenomination

Simple application that given a number of rupiahs will calculate the minimum number of rupiahs needed to make that amount

example : 15000 = 1 x Rp10000, 1x Rp5000 Rp3900 = 1x Rp2000, 1x Rp1000, 1x Rp500, 4x Rp100 12510 = 1 x Rp10000, 1x Rp2000, 1x Rp500, left Rp10 (no available fraction)

Examples of valid inputs with their canonical equivalents 18.215 (18215), Rp17500 (17500), Rp17.500,00 (17500), Rp 120.325 (120325), 005.000 (5000), 001000 (1000)

Examples of invalid inputs: 17,500 (invalid separator), 2 500(invalid separator), 3000 Rp (valid character in wrong position), Rp (missing value)

Account for only available current rupiah fractions 100000, 50000, 20000, 10000, 5000, 1000, 500, 100 and 50.

How to run this application?

Application built using React. To run this application, you need to install npm on your computer.

Demo : http://demo.buhori.com/

Installation Steps

1. Clone project

Navigate to the terminal / cmd location to copy this project, and clone the project from github repository.

$ cd {YOUR_DIRECTORY}
$ git clone https://github.com/agunbuhori/rupiah.git
$ cd rupiah

2. Run / compile project

Run or compile the project by using the npm

$ npm run dev
or
$ npm run build

if you get an error when running the command, maybe because there are several modules missing. You only need to install the module with the command:

$ npm i

3. Run compile result

Open the index.html file in the dist folder, then open the file using a web browser.

About

I am working on this project to fulfill the Tokopedia test requirements

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •