0
How to create a simple calculator.
Urgent coders.
8 odpowiedzi
+ 8
Yusuf Yau ,
your post is missing nearly all required information to get help. please update your post.
it should include:
> the programming language (to be placed in tags)
> if your post is related to a sololearn tutorial, we need to know the name of it, also the module and lesson /exercise name.
> a clear task description with input / output sample
> a link that points to your code try
> a description what exactly your issue is, (if possible including an error message)
+ 6
It's not as easy to explain that here; however, you can visit YouTube. There, you will find many examples and explanations. If you're following along with one of the tutorials from YouTube and have doubts, you may come back to the Q&A for specific help.
+ 4
By learning coding
+ 3
To create a simple calculator, you will need to:
1.Choose a programming language and development environment.
2.Create a new project and add the necessary files.
3.Implement the basic calculator functions, such as addition, subtraction, multiplication, and division.
4.Add a user interface to allow the user to enter numbers and select operations.
5.Test the calculator to make sure it works correctly.
use Python programming language
+ 2
Lothar Right
+ 1
Declare and initial the variable
Use if or switch to recognize the operator
Print the result
0
You can implement a simple calculator that operates in Reverse Polish Notation (postfix notation) with only a stack and an interpreter. For an infix notation calculator you'll still need a stack to track operations inside of parentheses.
The most rudimentary calculator application will need to accept a stream of input symbols, perform the appropriate operations on that stream, and return the result.
I suggest building a postfix calculator at some point because it's just a few short steps away from a compiler, which is also a great exercise.
0
Im gonna assume your taking about a calculator in a web,
Here is mine you can go threw it and make your own based of mine
https://sololearn.com/compiler-playground/WLqWBrmsWXnV/?ref=app