Abstract
In this chapter, you start learning some basics about a few mathematical operations, including prime numbers and the Roman numeral system. Additionally, I present a couple of ideas for number games. With this knowledge, you should be well prepared for a multitude of exercises.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
As an optimization, you actually only have to calculate up to the root. I briefly discuss this in the Possible optimizations practical tip.
- 2.
Interestingly the value 0 does not exist in Roman numerals.
- 3.
For syntactically invalid Roman numbers, such as IXD, an incorrect result, here 489, can be computed—by subtraction rule twice in a row: 0 − 1 − 10 + 500.
- 4.
Please consult my book Java – die Neuerungen in Version 9 bis 14: Modularisierung, Syntax- und API-Erweiterungen [Ind20b] for an overview of many relevant innovations in the current Java versions.
- 5.
For syntactically invalid Roman numbers, such as IXD, an incorrect result, here 489, can be computed—by subtraction rule twice in a row: 0 − 1 − 10 + 500.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature
About this chapter
Cite this chapter
Inden, M. (2022). Mathematical Problems. In: Java Challenges. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-7395-1_2
Download citation
DOI: https://doi.org/10.1007/978-1-4842-7395-1_2
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-7394-4
Online ISBN: 978-1-4842-7395-1
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)