Abstract
At this point we are going to take a short break from our detailed study of C and develop the program for a simple calculator. This should serve to consolidate your understanding of the topics covered so far. In this chapter we will be devising an algorithm and developing the functions required for this task. In the process we will be looking briefly at parsing and recursion. This chapter will provide you with a number of useful functions which can be used in a variety of programs. Furthermore the development of a solution from the initial problem definition through the various stages of stepwise refinement, algorithm design, coding and testing should be helpful in working through problems of your own. There are no exercises as such in this chapter, but you should work through all the functions and test them out on your own system. There are alternative ways of implementing some of the functions and new ones can be written which may improve the modularity and enhance the operation of the final program. So, as you work through this chapter, you should keep an eye open for any enhancements or modifications which can be made.
“Does a calculating machine calculate?”
Ludwig Wittgenstein
Preview
Unable to display preview. Download preview PDF.
Copyright information
© 1991 W. Arthur Chapman
About this chapter
Cite this chapter
Chapman, W.A. (1991). The calculator. In: Mastering C Programming. Palgrave Master Series. Palgrave, London. https://doi.org/10.1007/978-1-349-11015-5_7
Download citation
DOI: https://doi.org/10.1007/978-1-349-11015-5_7
Publisher Name: Palgrave, London
Print ISBN: 978-0-333-49842-2
Online ISBN: 978-1-349-11015-5
eBook Packages: EngineeringEngineering (R0)