Questions tagged [calculator]
This tag is for questions about calculators.
549
questions
2
votes
1
answer
111
views
Advanced Python Calculator using OOP
I've been into computer science fundamentals (proper data structures/algorithms/etc) including Object Oriented Programming. Therefore, I decided to reformat my old traditional Python Calculator into ...
8
votes
1
answer
808
views
Operator-precedence calculator in C
Recently, I've been wanting to do some larger C projects than I'm used to, since I really like the language. So, as a first step, I decided to implement a nice calculator. My end goal is implementing ...
4
votes
3
answers
313
views
Calculation of centrifugal liquid propellant injectors
There is this code in which the calculation of the centrifugal nozzle of a liquid rocket engine is performed. All basic calculations take place in the Injector ...
3
votes
1
answer
163
views
Advanced String Calculator in C++
This is a follow-up question for String Calculator in C++. Considering the suggestions mentioned in MrBean Bremen's answer and Martin York's answer. I am trying to modify the code and trying to ...
4
votes
2
answers
149
views
String Calculator in C++
As a coding exercise, I am trying to implement a calculator which takes string as input, with addition (+), subtraction (-), multiplication (*), division (/) and power (^) functions. For example, ...
7
votes
3
answers
2k
views
Shunting yard calculator in C
I'm new to C, and made this program that parses a string expression into a linked list post-fix expression, and then evaluates it, without parsing the string beforehand. Wondering if there is anything ...
3
votes
0
answers
67
views
Simple truss stiffness matrix calculator in Rust
I recently developed this calculator for some FEA homework i had. I'm still trying to familiarize myself with fundamental rust concepts like the ownership and borrowing. Pls let me know if there is ...
7
votes
1
answer
408
views
Scientific Calculator
I finished this code a few minutes ago. It started off as an explanation of a basic calculator in C to a friend. Then we decided to take it further and I made this. Please tell me where I can make ...
7
votes
2
answers
447
views
Mathematical calculation of engine fuel injectors
There is a code that performs calculations of parts of fuel injectors. There are two classes in which the basic calculations take place, they are called ...
1
vote
1
answer
137
views
Quadratic equation solution solution searcher
Here is a simple Learner practice piece of Code, which supposses to comply and give solutions to a Quadrant Equity problem (requires to give it values of a, b and c for a Quadrant function). Please ...
2
votes
1
answer
520
views
A very basic calculator in C#
I'm trying to learn C#, I made this calculator with my current knowledge. It works as I intended, but I'd appreciate some input on my code.
...
2
votes
2
answers
489
views
Simple calculator in python using tkinter
I just learned Python and Tkinter and I've just made a simple calculator using Tkinter for a small project at my school. It can do addition, subtraction, multiplication and division. I think that my ...
1
vote
1
answer
144
views
The simple calculator in Ruby
I wrote the simple calculator in Ruby. This is my first program in this language. I've switched recently from Python to Ruby. What do you think about my work? Thanks
...
3
votes
2
answers
118
views
Income Tax Calculator using 1913 tax standards
I am a beginner in a class and recently given a problem where I have to design a income tax calculator but using the 1913 tax standards. I was able to get it down I think but I was just wondering if ...
2
votes
1
answer
206
views
Interest/Discount rate and loan calculator java
I'm currently learning Java at home with YouTube tutorials.
I took a short break from the course to make a small project for calculating costs of loan.
It's not economically accurate - I followed ...
7
votes
1
answer
1k
views
Basic C# Calculator
I am a beginner programmer, I decided to make this calculator program to test my knowledge on basic C# syntax, the code executes as intended, however I would like to shorten it to be more concise.
<...
3
votes
1
answer
551
views
Calculator (Java/Beginner)
I finished my first calculator using Java!
I try to apply Object-Oriented Programming!
I'll add my gitHub link if you're suited to viewing code on gitHub.
Here is a link to my GitHub Calculator ...
1
vote
3
answers
402
views
1
vote
1
answer
158
views
Simple calculator project
This code displays a simple decimal calculator with operations like add, subtract, multiply and divide. It also has a function to clear the result.
I try to reduce code repetition. I still think I ...
3
votes
3
answers
689
views
Command line calculator in C
This code is an arithmetic parser as is the code in a previous question of mine. However this parser handles floating point arguments and mathematical functions, and handles them without needing to ...
2
votes
2
answers
149
views
Simple console calculator
Thats my first application on Python. Please help me do my code better. I try make the simple application . I don't know is I do it right and how do my code cleaner.
main.py . Entry point of my ...
5
votes
5
answers
333
views
Trigonometric functions calculator
This is a basic 6 trigonometric functions calculator that I will incorporate into my main calculator project. It works as intended, but the BUILD MESSAGES issue a warning, the warning being:
Warning: '...
3
votes
1
answer
258
views
Calculator for multiplying price and quantity
I'm coding with c++. Basically the question is about to make calculation of any product and calculate with price and quantity with our name. Anyone can simplify this coding?
...
8
votes
1
answer
883
views
A Simple Calculator
Can I code this Simple Calculator in a more efficient way?
I'm currently self-taught, one thing I notice is that I get an error if I don't press the space bar after each entry, is there a way to avoid ...
3
votes
2
answers
297
views
Binary Expression Tree that evaluates Postfix input
My code for a Binary Expression Tree that takes postfix input from the user and recursively builds and evaluates the expression. Proper input can be assumed.
...
5
votes
2
answers
634
views
Terminal calculator that saves and displays calculation history
I am self-learning C++ and this was my first smallish project. The goal was to create a working calculator that runs in the terminal, saves history of previous calculations, and has the ability to ...
2
votes
1
answer
469
views
Basic command-line Python calculator
I made this basic Python calculator. It just does addition, subtraction, division, and multlipication.
I feel like the code is a mess, but it does what I want it to, and I feel like it does it ...
-4
votes
1
answer
94
views
Simple Vue calculator [closed]
I made conditional calculator in Vue js but I need help to make it more efficient.
https://jsfiddle.net/wbrx9cyp/1/
example of code:
...
8
votes
1
answer
707
views
Program to add or subtract a pair of numbers
Newbie here :) I have been working on a program that reads a pair of numbers from
standard input, along with a mathematical operation and an initial capacity for
storing the numbers; and using this ...
4
votes
1
answer
212
views
Calculator app made in Java (ver2)
A few days ago, I uploaded my first version of my calculator app I made in android studio. I got some great some feedback on it and tried to improve my app as much as I could.
changes/new featres:
...
3
votes
2
answers
222
views
Python Calculator - Feedback/Improvements
I made a calculator for a class I am taking. It works like this:
Tells user the input range is between two numbers, and asks if want to change the range. If yes, asks the user input new numbers (if ...
4
votes
1
answer
492
views
Windows standard calulator replica in WinForms C#
I tried my best to replicate, in style and functionality, the Windows standard calculator:
I would like to get some feedback on the efficiency and readability of my code as well as the approach i ...
5
votes
1
answer
3k
views
Calculator App with Kotlin and Android Studio
Hello I am an absolute beginner with Kotlin and Android Studio.
I want to hear what I could do better for the next time or any flaws my code has.
The code implements a four-function calculator (+ - ✕ ÷...
2
votes
0
answers
246
views
Mean, median and mode GUI
This program takes x numbers and displays the mean, median and mode.
My goal here was to use classes and class properties the best i could to make the code shorter (honestly i may have just made it ...
1
vote
1
answer
115
views
How can I implement this calculator in a better way?
I have this calculator. The user is asked to provide three numbers as well as the numeric
operation they wish to perform. Based on this input, a certain case will be executed.
The calculator is ...
12
votes
5
answers
4k
views
My first C program: quadratic formula calculator code
Recently I've started to learn the C programming language. This is my first program which finds zero places of quadratic formulas. Doesn't parse, just gets the discriminants, counts delta and x1, x2.
<...
2
votes
1
answer
227
views
Total income program: budget and savings calculator
I started my cs50 course this week and I will be trying to make little projects alongside to reaffirm what I've learned thus far. Here I have made a very basic budget and savings calculator, I am ...
4
votes
3
answers
157
views
Circle & Sphere Calculator
I've just wrote my first real C program. It calculates the dimensions of a circle or a sphere based on the user input.
The program asks the user which dimension they are entering and then prints the ...
0
votes
1
answer
404
views
income calculator
I'm really new to code optimization and JS. And I like to learn with clean code. I would like to ask for help on optimizing my code.
The code below parses the value of four inputs as floating point ...
1
vote
1
answer
1k
views
JavaScript change calculator
I'm new at coding and I'm learning it on freeCodeCamp, that's the most hardest problem that I have already do at that site. After finishing it (after I vibrated as if I had won a world competition of ...
7
votes
2
answers
209
views
Calculator with JavaScript
I've just created a fully working calculator for my portfolio, and I would like to get a code review. Does that code looks good, or maybe I should refactor it? Is it good enough to be a part of a ...
0
votes
2
answers
394
views
Strategy Design Pattern in ASP.Net Core MVC Project
I tried to make a calculator using the Strategy pattern in ASP.Net Core MVC (following an example from the Internet)
Please review my code and tell me what could be wrong and how to make it better?
My ...
4
votes
1
answer
2k
views
Simple Calculator Program That Operates On Multiple Inputs
This is my third version of building a simple Python calculator. The first two versions only operate on two inputs to perform calculation, this version allows multiple inputs. However, the result will ...
3
votes
1
answer
315
views
Basic calculator using break statements to control the logic
Below is a simple calculator program in which I'm using break statements to control the logic. I was wondering if this is overkill on the break statements or is it OK.
...
5
votes
2
answers
483
views
Reverse Polish Notation in C (using a Finite State Machine)
I recently learned about Finite State Machines (FSM) and thought I'd use that to implement a Reverse Polish Notation (RPN) calculator.
I wanted it to also work nicely with the unix pipe. For example, ...
5
votes
1
answer
255
views
Object-oriented calculator class
I started learning OOP programming style in PHP. After end of the course, I wrote a simple calculator in OOP style. Can some one check my code and give me feedback?
...
2
votes
3
answers
371
views
C++ evaluating an arithmetic expression in RPN format using ADT stack
Write a program that uses an ADT Stack to evaluate arithmetic expressions in RPN format. The contents of the stack should be displayed on the screen during evaluation. The allowed arithmetic operators ...
1
vote
2
answers
2k
views
Simple Win32 API Calculator in C
I've been learning C as my first language and recently I decided to learn how to create Win32 apps written in C. I Quickly realized, though, that my biggest challenge wasn't writing the Win32 app ...
1
vote
1
answer
267
views
Car price calculator
I'm writing this simple program for school, and using NumberFormat on all the variables seems very repetitive (Note that we were asked to use the ...
4
votes
3
answers
175
views
First C++ calculator
This is my first C++ program. It would be nice if you can tell me anything I could add or do differently.
I am new to C++ programming and I hope to learn more.
...