0

How to create a calculator

11th Nov 2018, 8:59 PM
Masud.nasa
Masud.nasa - avatar
12 Answers
+ 9
You can use if else ladder to create a simple calculator. For more complicated calculations you might need to implement it with stack.
11th Nov 2018, 9:51 PM
Mitali
Mitali - avatar
+ 9
Posts in Q/A section should be programming-related and aimed at helping individual learners and community members improve their programming skills! Please, read us guidelines: https://www.sololearn.com/discuss/1316935/?ref=app An useful code for any new user here!;) https://code.sololearn.com/WvG0MJq2dQ6y/ Use the search bar! https://www.sololearn.com/post/10362/?ref=app https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2436/?ref=app https://www.sololearn.com/learn/CSharp/2601/?ref=app
11th Nov 2018, 10:44 PM
Danijel Ivanović
Danijel Ivanović - avatar
+ 6
I created this post to select the good code to create a calculator. https://www.sololearn.com/post/31302/?ref=app
16th Nov 2018, 8:08 PM
program
program - avatar
+ 4
In what language?
18th Nov 2018, 4:17 AM
Chaim
Chaim - avatar
+ 2
With Python please.... Thank you
11th Nov 2018, 9:08 PM
Masud.nasa
Masud.nasa - avatar
+ 1
Start with a simple string analyser function that will tell you what are the operands and the operator in a simple string like "2-3", "8*5", etc.; then find a way to take in user input and display the result... if you want to have even more complex calculations, find a way to take into account operators priorities, parenthesis, etc... Good luck!
12th Nov 2018, 1:22 AM
CĂ©sar Sagaert
CĂ©sar Sagaert - avatar
14th Nov 2018, 3:24 PM
BT Lynn
BT Lynn - avatar
14th Nov 2018, 3:39 PM
Hein Thanth (Hein Hein)
Hein Thanth (Hein Hein) - avatar
+ 1
Yes Björn T-the point is in which language you want code it,because same codes in different languages can sometimes (code calculator have not big diffferences)have big differences.And anyway a lot of tutorials you have on internet sites,so good luck.😉
17th Nov 2018, 6:00 PM
Ben
Ben - avatar
0
Which language do you want to use?
11th Nov 2018, 9:05 PM
Björn Thomsen
Björn Thomsen - avatar
0
try learn 1st c for that to very easy to done
18th Nov 2018, 6:13 PM
Sudhanshu Vidyarthi
Sudhanshu Vidyarthi - avatar