Create a java project and a class Import lang,util and io packages Import scanner and math class Take input numbers as double datatype to calculate decimal values also Operators are declared as char datatype Take simple operations as + ,- ,* and / for calculator operations Use switch statement to select multiple operations Break statement is used to break the loop after a specified operation Default block is printed when an invalid operator is given The answer obtained after the operation is done,is stored in result
-
Notifications
You must be signed in to change notification settings - Fork 0
Doraemon2024/Simple-Java-Calculator
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
Created a simple calculator using Java Programming with switch cases and break statements,scanner classes and importing lang.math,util.scanner and io packages.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published