Plz guys i have a problem in my c++ simple calculator,
I made everything great but i just need an important hint for my assignment that i can't figure it out.
for example when i add two numbers(2+4) the result is (6)...
i need the number (6) to be stored in order to complete for further calculations..
i need to store the result to maximize the calculations.
plz can someone help me with this problem???
amroto
0
Light Poster
Recommended Answers
Jump to PostI don't know for sure what kind of calculator you are using but if it is a TI version this will work
in your program it should ask for your inputed numbers then save them...
example:
[LIST=1] [*]Prompt x, y [*]x+y→e [*]disp e [/LIST]
disp …
Jump to PostI'd do it something like this:
oper = '@'; cout << " enter first operand: " << '\n'; cin >> op1; while (op != '~') { cout << "\nEnter operator: " ; cout << "enter the tilde sign ('~') to stop" << '\n'; cin >> oper; if(oper …
Jump to PostI am not exactly sure what you wish for the program to do, but I am guessing you want it to evaluate statements like 5 + 2 + 8, instead of only 2 operands and an operation for each evaluation.
If what I am guessing you want to do …
All 9 Replies
TMD
0
Newbie Poster
amroto
0
Light Poster
Lerner
582
Nearly a Posting Maven
Joatmon
0
Junior Poster in Training
amroto
0
Light Poster
Joatmon
0
Junior Poster in Training
amroto
0
Light Poster
Joatmon
0
Junior Poster in Training
gbantsi_2
0
Newbie Poster
pspwxp fan
commented:
Nice bump :/
+0
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.