Support

Support Options

Submit a Support Ticket

 

The programming process: Calculator example

EXAMPLE: Calculator


Specification:

A calculator is a program that allows the user to perform simple arithmetic operations with the help of a computer.

When the program is run, it zeros the result. Then, it prompts the user for a specific operation and a number to be processed. After performing the operation, the result is updated and displayed.

Please download the programming examples from the contributions page.

C++ Programming Examples I

This resource contains several C++ examples including the makefile for compilation and linkage.

Refer specifically to the calculator example for this excercise.

My reference for this tutorial was Practical C++ programming, by O’Reilly.

  1. Programming

Comments on this entry

There are no comments at this time.

Post a comment

Please keep comments relevant to this entry.

Line breaks and paragraphs are automatically converted. URLs (starting with http://) or email addresses will automatically be linked.

nanoHUB.org, a resource for nanoscience and nanotechnology, is supported by the National Science Foundation and other funding agencies. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.