Skip to content

AlMakinah/calculator-methods-taman9333

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

The Calculator

Basic Operations

Write methods for following arithmatic operations, each method takes 2 inputs the first operand and the second operand:

  • Addition
  • Subtraction
  • Multiplication
  • Divide

Get User input

Write a method that asks the user for the 2 operands and the operation they want to perform, and accordingly calls the corresponding method and displays the result.

Take it a little further ( Advanced )

Add the Method Power as one of the mathmatical operations that your calculator accepts. (This is the symbol used for power ^) Implement the method for power using 2 different ways:

  • Search for a predefined method to calculate the power
  • Implement the power using multiplication such that m^n = m*m*m..*m (ntimes) i.e. 2^4 = 2*2*2*2

About

calculator-methods-taman9333 created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages