Skip to content

VeronikaSemykopna/-bBasic-arithmetic-operations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

-bBasic-arithmetic-operations

code implements a simple calculator four arithmetic operations (addition, subtraction, multiplication, and division) are implemented as separate functions: add(), subtract(), multiply(), and divide(). Each function takes two numbers as input and performs the corresponding operation.

The calculator() function is the main function that interacts with the user. It displays a menu of options for the arithmetic operations and prompts the user to choose an option. Based on the chosen option, it prompts the user to enter two numbers. The chosen operation is then performed, and the result is displayed. The user can continue making calculations until they choose to exit.

To use the calculator, you can call the calculator() function. The user is prompted to select an operation (1-5), enter the first number, and enter the second number. The result of the selected operation is then displayed. The user can choose to exit by selecting option 5.

Please note that this code assumes valid user input and does not include extensive error handling or input validation for simplicity

About

code implements a simple calculator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published