Skip to main content

# Questions tagged [calculator]

This tag is for questions about calculators.

548 questions
Filter by
Sorted by
Tagged with
2 votes
0 answers
106 views

### My first Java app: a calculator in Swing

I have created my first Java app. I am very familiar with C++ and thus without reading any books (just introduction, googling and IntelliJ auto-completion) I directly jumped into Java. So I made a ...
7 votes
4 answers
4k views

### Beginner C++ calculator

I'm relatively new to programming, but am really enjoying it. I have taken a couple of classes but mostly code for fun (for now). I decided to make a program implementing some basic functions, switch ...
6 votes
2 answers
218 views

### Calculate the cost of cement for a project

I am a newbie in a programming, and I just randomly chose a task for training from some group on Facebook. The task is to calculate the cost of cement for a construction project. The input is the ...
0 votes
1 answer
155 views

### Simple Python calculator 5

I am really new to Python and programming in general and I am trying to improve doing some projects like this one. I would like to know how I can improve this the right way. ...
• 117
5 votes
1 answer
3k views

### Simple Java OOP calculator with GUI

I'm learning Java and I've tried to write my own calculator with GUi based on this post. Here is the repo: https://github.com/MurDaD/java-calculator Could someone check my code and tell me how to ...
• 151
2 votes
2 answers
426 views

### Four-function calculator with buttons for digits and operators

I would like make this calculator program more Object Oriented but I'm struggling with how to do it. The calculator works perfectly but I would like to have another class that does the calculations ...
1 vote
1 answer
104 views

### Beginner's calculator, supporting M, D, A, S operations on two numbers

I'm new to programming and I sort of understand the concept of methods but, I am little overwhelmed by this program and want to shorten it using methods to make it easier to read and understand. <...
• 11
0 votes
1 answer
191 views

### Calculator application by an HTML beginner

I've created a Calculator using HTML, CSS and core JS. I just need some suggestions or ...
8 votes
3 answers
8k views

### Taxi fare calculator, trip recorder, and fuel calculator

I solved this practice problem in preparation for school exams. The owner of a taxi company wants a system that calculates how much money his taxis take in one day. Write and test a program ...
• 145
4 votes
2 answers
467 views

### C bit mask calculator written using GTK+ 3

I've been studying C on my own using K&R 2nd Edition, and started exploring GTK+ to practice some of the concepts I've learned by making GUI applications. This is the first GUI application I've ...
• 513
4 votes
2 answers
643 views

### Calculator for scoring dives in a competition

I was looking for a light weight coding challenge and found this: In the sport of diving, seven judges award a score between 0 and 10, where each score may be a floating-point value. The highest ...
• 577
-1 votes
1 answer
912 views

### Compound interest calculator homework [closed]

I am a beginner at coding Java and am having a tough time understanding what is wrong with this code. This is an assignment I had posted about earlier and I also went to a Java tutor at my school for ...
• 1
12 votes
3 answers
1k views

### Console calculator for 2 numbers at a time

I'm learning to code for fun, and just finished my first program. I don't know what to think about it since it's my first finished real code, but hey it works! I'm pretty sure that it can be written ...
-2 votes
1 answer
2k views

### Simple calculator with validation [closed]

I've implemented a simple calculator in C# that takes in the left operand, the operator, and the right operand. Once the calculate button is clicked, I use four methods to validate the inputs: 1. The ...
2 votes
2 answers
2k views

### JS calculator, respecting order of operations

I have a function that receives an array of numbers and operations Ex: userEntry = [3,+,3,x,3] -> returns 12 It is a calculator that adheres to the proper ...
• 65
3 votes
2 answers
4k views

### JavaScript interest rate calculator

As I am still new to web development, refactoring my code is still something that gives me some trouble. I would really appreciate it if someone could look over the Javascript for an interest rate ...
• 33
2 votes
1 answer
4k views

### Purchase tickets calculation with JavaScript

I'm creating a page where users can purchase an adult, child or senior ticket, each with it's own pricing. Here's the code for review. Please let me know if there are ways to improve upon this code. ...
• 185
6 votes
2 answers
6k views

### Simple JavaScript tip calculator

I've built a fairly simple tip calculator. What I have so far is a bunch of functions to calculate each tip amount and calling each with eventListener. It works ...
• 185
4 votes
2 answers
20k views

### GPA calculator in Java

This is a program I typed up for a project pertaining to GPA calculation. However, I want to find an alternative to if then statements that are NOT conditionals, loops, or arrays. Is there an ...
• 41
5 votes
1 answer
3k views

### Python 3 calculator with tkinter

I have been programming for a long time. Only recently have I decided to take a stab at Python (I should be working with C# as I am in school for it, but I don't care for Windows, long story). I was ...
• 195
2 votes
1 answer
47 views

### Redux actions inside a container for a calculator

I used to import all the actions in the container's argument which looks messy (I put a comment below where I do it in that way). I want to know if there is a better approach when using actions with ...
• 121
3 votes
1 answer
1k views

### Tkinter based calculator

I've recently finished building a calculator in Python using Tkinter, and would appreciate any and all feedback on it. Please ignore the use of the eval function, ...
• 33
4 votes
2 answers
2k views

### Simple Python calculator applying MVC

I've been implementing a simple Python calculator for learning purposes. Since there are no properties or bindings like in Javafx, I implemented my own MVC pattern. I'm aware of missing logic like ...
• 123
2 votes
1 answer
2k views

### Console program, let users to enter prices calculate subtotal, tax, and total with C Sharp

I am posting this here because it was suggested that it is the best place by a seasoned user. This is a project I already submitted, but I never received feedback. All my upcoming assignments will be ...
4 votes
1 answer
5k views

### A tax calculator application to calculate tax and print final receipt

Although this question has been asked a lot of times, I was hoping for a feedback on my approach. Tax Calculator Basic sales tax is applicable at a rate of 10% on all goods, except books, food, ...
• 546
1 vote
3 answers
3k views

### Calculate the difference between the elements in a list

So I have two lists which have the same size. One is called roadS and the second one is called simTime. My aim is to calculate the difference between two indexes which lie next to each other and ...
• 53
3 votes
2 answers
142 views

### Calculate the heat flow (for radiators)

I´m a programing rookie with minor javascript skills. So I ask you for a code review since I'm not sure whether my code is ok. Short explanation of my program: I work for the heating industry. ...
• 31
6 votes
2 answers
2k views

### Cake-ordering form and calculator

I’m a designer learning to code and I’ve built a simple form calculator for ordering cakes. I would love it if you could show me how to make the code more idiomatic. How can it be more consistent, ...
• 94
3 votes
2 answers
198 views

### JavaScript calculator that only adds numbers

This is a JavaScript calculator that uses JQuery and bootstrap. How can I improve the CSS, HTML, JS and the general design? ...
• 295
4 votes
2 answers
149 views

### Vanilla JS calculator for learning coding fundamentals

Since I am self taught, I would greatly appreciate some input on my code for this JS calculator: What redundancies i'm failing to see and remove? How is my naming for var's and functions? Is it clear ...
• 65
4 votes
3 answers
1k views

### Simple C++ calculator

I'm a programming newbie. In fact, this is my second code ever (after Hello World). I did a lot of reading actually, here on Stack Overflow, and other websites. I would like to know if there's a way ...
2 votes
2 answers
271 views

### A very basic Java calculator that calculates only single digit numbers

How should I incorporate a JButton array, and how do I get rid of the multitude of action listeners? I would also like to modify it so that you can do more than one operation on numbers with multiple ...
• 123
2 votes
1 answer
1k views

### Profit Margin Calculator in Python (with installments)

I was sent here from StackOverflow to get some insight on how I can improve my code. I'm a beginner and the program is not streamlined at all. What the program does: Takes an input of the Retail ...
• 23
5 votes
2 answers
183 views

### Python novice's calculator

This is my first ever project I've coded in Python so I'm sorry if it's a little novice. I'm just looking for beginner feedback on what I could improve next time. There is one issue with this ...
• 1,345
4 votes
1 answer
282 views

### Age in hours calculator

I've written a small script, which calculates hours since the birth. I ask use about how old they are in years, months and day. I show them approximately how many hours they have lived. Below is the ...
6 votes
1 answer
4k views

### Compound Interest Calculator in HTML/JS

The code below is a quick, working example of a compound interest table I wrote. My concern is mainly about separating the application data/logic from the UI code. I didn't use any frameworks on ...
1 vote
2 answers
1k views

### BMI calculator/assessor

I've just started with Java. The code below calculates Body Mass Index (BMI). Could someone look for my code and assess it? Maybe I should write something more? All advice will be very helpful. ...
• 33
5 votes
2 answers
5k views

### Basic calculator in Python

I am a beginner in Python, I want to know if this code can be improved. Is it possible to make it work without the if/else? ...
8 votes
1 answer
707 views

### Simple postfix calculator app

Premise I'm writing a simple postfix calculator app in C++ using the Qt (5) GUI framework. This is simply for practice with software development. Visually, my calculator looks like this: The ...
3 votes
1 answer
3k views

### Calculator that can handle any number of numbers and respects order of operation

The next thing I will work on is parentheses. Do you think it would be smarter to split the input into 2 lists, one for operators and one for numbers? Also, is there anything I can/should improve? <...
• 133
7 votes
1 answer
4k views

### A simple C# calculator

I believe that building a simple calculator is one of the most popular tasks for beginners. There are several conditions, however, in this case: Delegates should be used The user types a string that ...
• 203
4 votes
1 answer
480 views

### Simple unit converter and shipment builder

My first python program top to bottom used for work. First it converts units from imperial to metric and vice versa, then adds the dimensions to a shipment and prints the shipment. When you do a new ...
• 43
1 vote
2 answers
5k views

### GPA calculator, implemented for a course

This is from a Java course which I'm taking. The class StudentUtil, including method-declarations and comments, was provided by the instructor. I just had to finish ...
• 4,358
6 votes
2 answers
9k views

### String input Calculator

The following program implements a calculator that takes string inputs in the form of two values separated by an operator. It splits the inputs in to their parts, and then applies the operation, and ...
3 votes
1 answer
2k views

### Python percentage calculator [closed]

I'm learning Python for 2 months now and I'm working on a little exercise app calculating percentages. I'd like to ask for a code review and comments. I'd like to make sure I'm following the right ...
• 31
6 votes
1 answer
715 views

### Shuntyard Javascript Calculator with unit tests

I have been writing a javascript calculator for about a few weeks. It uses a shuntyard algorithm to do order of operations. Some unit tests I have not finished yet and there is some functionality ...
• 163
5 votes
1 answer
14k views

### Simple Calculator with switch statement

I just start learning to code in C#. Is there any other short way to make calculator like this ...
• 163
0 votes
1 answer
3k views

### Creating the buttons on a calculator using a for-loop

How can I make the for-loop more compact by using functions for actionlistener? ...
7 votes
1 answer
18k views

### Parking Charges exercise from Deitel's C book

I'm learning to code with Deitel's C: How to program book, 6th edition. Here's Exercise 5.9 (Parking Charges): A parking garage charges a \$2.00 minimum fee to park for up to three hours and an ...
2 votes
2 answers
340 views

### Click-through rate calculator using jQuery

I created a calculator for CTR with jQuery. The calculator is working just the way I want, but I'm quite new to jQuery and I wonder if I am using jQuery effectively. The goal of the code is that if ...
• 31