Creating a basic calculator

+1 josh stainthorpe · November 1, 2015
TheNewBoston, I'm following your C++ tutorials and i wanted to know how i would be able to asign difrend calculating methods like / * - +. So in a nut chell, how do i make a calculator XD

Post a Reply

Replies

Oldest  Newest  Rating
+1 Artur Yasinskiy · November 3, 2015
What do you mean (/ * - +)? Be more specific.
+1 Gauri Shankar Badola · November 3, 2015
store all these characters in a char variable and then use switch statement to execute them.


PS : * is a pointer , so instead of making user to enter * for multiplication , use x or X for it, otherwise you might not get what you expected. 
  • 1

C++

107,241 followers
About

Used in many types of software including music players, video games, and many large scale applications.

Links
Moderators
Bucky Roberts Administrator