Skip to content

punchedscull/Calc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

calculator on java The calculator can perform addition, subtraction, multiplication and division operations with two numbers: a + b, a - b, a * b, a / b. Data is transferred in one line. Solutions in which each number and arithmetic operation is passed from a new line are considered incorrect. The calculator can work with both Arabic (1,2,3,4,5…) and Roman (I,II,III,IV,V…) numbers. The calculator must accept input numbers from 1 to 10 inclusive, no more. At the output, the numbers are not limited in size and can be any. The calculator can only work with integers. The calculator can only work with Arabic or Roman numerals at the same time, when the user enters a string like 3 + II, the calculator should throw an exception and stop working. When entering Roman numerals, the answer should be displayed in Roman numerals, respectively, when entering Arabic - the answer is expected in Arabic When the user enters invalid numbers, the application throws an exception and exits. When the user enters a string that does not match one of the above arithmetic operations, the application throws an exception and exits. The result of the division operation is an integer, the remainder is discarded. The result of the calculator with Arabic numbers can be negative numbers and zero. The result of the calculator with Roman numerals can only be positive numbers, if the result of the work is less than one, an exception is thrown

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages