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.

7
votes
3answers
677 views

C++ arithmetic on two numbers [closed]

I need someone with experience to judge my first project to let me know what I have to work on. I recently started learning C++ using resources like Solo Learn and Bucky's tutorials on YouTube hoping ...
2
votes
3answers
61 views

Free time calculator

I started learning Python 2 about a week ago, using Codecademy and Stack Overflow answers to help me learn. I wrote a code to calculate the user's free time based on user sleep and work time. It also ...
14
votes
3answers
2k views

BMI calculator in python using if statements

I am a beginner in the python language. I wrote a BMI calculator and I am wondering if there are any improvements I could make to the code. This is the code below: ...
3
votes
3answers
250 views

Calculate with numbers from different number systems

This program calculates with numbers from different number systems and outputs the result in the desired number system. You call it like that: ...
0
votes
1answer
52 views

Calculating the volume of a box

I've been studying more C using C Programming: A Modern Approach: A Modern Approach 2nd Edition by K.N. King as well as reading the comp.lang.c FAQ and the Code Review section here on Stack Exchange ...
3
votes
2answers
132 views

Simple C# calculator

I'm doing a simple calc for my school. The code looks okay to me, but I'm not sure if there is something to improve, but probably there is always something to improve. Any ideas how to make it look ...
2
votes
2answers
91 views

Calculator to add time intervals

I have written a little program that calculates the time by given strings. A time string in the context of this program consists of a number and a following letter that can be s, m, h, or d. You can ...
2
votes
0answers
60 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 ...
8
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 ...
6
votes
2answers
125 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
52 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
122 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
94 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
53 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
69 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
1k 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
107 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
101 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
127 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
868 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
88 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
79 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
61 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
142 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
805 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
572 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
298 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
27 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
436 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
243 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
223 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
237 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
83 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
90 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
273 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, ...
2
votes
2answers
126 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
83 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
167 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
97 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
169 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
86 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
102 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
497 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
514 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
2k 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
191 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
175 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
116 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
563 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
156 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 ...