Coder Profile - Show off your skills, get a coder profile.
 
 
 
The Author
FallingTears
Samuel S.
Send A Message
Rating
8.00
out of 10
( 1 Ratings )
Please login to rate source codes.

Click here to register a free account with us.
General Details
C++
Posted 74 Days Ago
255 Views
Received 1 Rating
More Codes By This Author
Fun with Arrays Part 2
Fun with Arrays
Stock Market Version 2.0
Java: Calculate/Display A...
The Simplest JavaScript M...
Articles By This Author
Java: Obtaining User Inpu...

Simple C++ Calculator


Description
A calculator for elementary students.

Four basic mathematical functions:

1. Addition - No negative numbers allowed, only positive numbers.
2. Subtraction - No negative numbers, only positive, only positive outcomes.
3. Multiplication - No negative numbers, only positive outcomes
4. Division - No divide by zero, no negative numbers, no negative outcomes, no remainders
Technical
Dev-C++, Visual Studio/Visual C++ Express
Source Code
Comments
Please login to post comments.
 
FallingTears     Posted 71 Days Ago
 
 
Thanks.

I was thinking about making a class for this calculator and use some void functions
to make the calculations. That'll be the next upgrade. I think that I will use
switch, like you suggested, instead of a bunch of if statements, to call the
different functions that are created. The next version will probably be 1.50 (if
I've calculated all the upgrades right).

Needless to say, I haven't made many C++ classes, so I'm going to get out
my ol' C++ book and practice a few classes before I try to make the class for
this calculator.
 
Cinjection     Posted 72 Days Ago
 
 
Good code. :) It's good to see someone writing C++ instead of some C-C++ hybrid.


If you want to make the code more readable, I would replace the if statements with
a switch statement. I would also group code into methods and then just call them from
the switch statements.
Page 1 of 1
More "C++" Source Codes By This Author
Recently Posted "C++" Source Codes
Recently Rated "C++" Source Codes
 
 
Latest News About Coder Profile
Coder Profile Poll
What is the next application you would like to be added to your profiles?

Books
Coding Challenges
Project Management
Blog
Tutorials


please login to cast your vote
and see the results of this poll
Latest Coder Profile Changes
Coder Profile was last updated
5 Days Ago
Official Blog :: Make A Donation :: Credits :: Contact Me
Terms & Conditions :: Privacy Policy :: Documents :: Wallpapers
Version 1.46.00
Copyright © 2007 - 2008, Scott Thompson, All Rights Reserved