Skip to content

tangobango5/Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Calculator

React assignment

Question Description

Create a basic calculator using react. Your app should have below mentioned functionality.

  • Add
  • Subtract
  • Multiply
  • Divide

Tasks:

  1. Present all digits(0 to 9) and five symbols (*, %, +, -, =) and a display area (No need to write fancy css).

  2. Allow all four operations to happen. User should be able to use last result with a variable "_" (underscore).

  3. Allow user to use both keyboard and onscreen fields.

  4. For simplicity you can clear the screen once user presses a symbol.

Eg:

  • User presses 1123 (Display area shows 1123)

  • User presses * (Display area now only shows *)

  • User presses 0 (Display area now only shows 0)

  • User presses enter or = symbol (Display area now shows 0)

  • This complete one cycle.

  • In the next cycle user selects _ + 3 (Display area should now show 3)

  • In the next cycle user selects _ * 4 (Display area should now show 12)

  • Note: User need not focus on the display for the calculator to work. Eveything should work even without touching the mouse.

License

ISC © Ritesh

About

React Calculator assignment

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published