Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [calculator]

This tag is for questions about calculators.

-3
votes
0answers
10 views

Bag check for coins with validation [on hold]

The objective of the program is to check that the weight of the bag that the user inputs and then calculate how many coins are needed to the added/removed to ensure the bag has the right amount of ...
7
votes
4answers
3k 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 ...
0
votes
0answers
43 views

JavaFX Basic 4-Function Calculator

I would appreciate your feedback on any improvements I can make on this 4 function Calculator I wrote in Java with JavaFX. I used a Scene Builder for the layout, see both the Java and FXML code below. ...
6
votes
2answers
120 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 ...
-1
votes
1answer
44 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. ...
2
votes
1answer
55 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 ...
2
votes
2answers
87 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
1answer
47 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. <...
0
votes
1answer
56 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
3answers
913 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 ...
4
votes
2answers
80 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 ...
4
votes
2answers
92 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 ...
-1
votes
1answer
80 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 ...
11
votes
3answers
786 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
1answer
52 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
2answers
71 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 ...
2
votes
2answers
46 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 ...
2
votes
1answer
88 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. ...
6
votes
2answers
393 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 ...
2
votes
3answers
219 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 ...
5
votes
1answer
130 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 ...
1
vote
1answer
19 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 ...
2
votes
1answer
309 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, ...
3
votes
1answer
114 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 ...
1
vote
1answer
117 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
1answer
96 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, ...
1
vote
3answers
80 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 ...
2
votes
1answer
88 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. ...
6
votes
2answers
248 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, ...
1
vote
2answers
110 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? ...
4
votes
2answers
70 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 ...
4
votes
3answers
164 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
2answers
95 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 ...
2
votes
1answer
126 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 ...
5
votes
2answers
71 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 ...
4
votes
1answer
96 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 ...
2
votes
1answer
211 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 ...
0
votes
2answers
393 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. ...
5
votes
3answers
1k 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
1answer
178 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 ...
1
vote
0answers
123 views

Vanilla JavaScript Calculator

Like basically everyone else, I made a vanilla JS calculator as practice and am hoping to get some feedback on it. I struggled a little bit with the actual logic, especially at the beginning, in terms ...
3
votes
1answer
94 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? <...
7
votes
1answer
470 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 ...
4
votes
1answer
134 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 ...
1
vote
2answers
426 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 ...
5
votes
2answers
1k 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
1answer
330 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 ...
6
votes
1answer
193 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 ...
5
votes
1answer
2k 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 ...
0
votes
1answer
273 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? ...