This tag is for questions about calculators.

learn more… | top users | synonyms

5
votes
1answer
207 views

Celestial age calculator

Our solar system has 8 planets, including earth. Our calendar has some very confusing concepts such as leap years, which I still don't fully understand. In fact, since where I live, we use a different ...
1
vote
0answers
91 views

Code that checks input for calculator app

I made an Android app, a calculator, that uses buttons for input, Android keyboard is turned off. I have a block of code, that handles the input to string and checks for some things at the same time. ...
2
votes
1answer
78 views

Weightlifting calculator

I'm building a simple iOS app using Swift that calculates the One Rep Max weight a user can theoretically lift. User inputs a weight lifted, the number of repetitions and the app uses one of several ...
9
votes
1answer
240 views

A prefix notation calculator that asks about everything step by step

I made a prefix notation calculator. Prefix notation, aka Polish notation, is a form of notation for logic, arithmetic and algebra, like infix and postfix (reverse Polish) notation. The expression '+...
0
votes
1answer
34 views

Value-added tax calculator app

The app calculates the tax which is included in a (given) amount. Because I'm new with both libraries (React.js and Foundation) I would appreciate hints and improvement suggestions. Live demo on ...
5
votes
2answers
110 views

Simple Area of Shape Calculator

So I made this calculator the other day as a small project. I just wanted to know if I remembered the fundamentals. It works fine from the looks of it, but I know there are always ways to improve. <...
2
votes
1answer
162 views

Weight-loss calculator

I have a table that holds a user's weight for specific days. In my weights_controller.rb index action I can show these weights - no problem. What I also want to ...
5
votes
3answers
175 views

Simple calculator in C#

It is a basic calculator where the user inputs two numbers, and an operation and the program makes it into an equation and gets the answer. For example, if the user enters number 2 number 3 and tells ...
9
votes
4answers
320 views

Basic Calculator - Takes 2 numbers and does an operation with them

I was wondering if anyone has any suggestions to improve my code. The code works perfectly fine for me (compiled it in BlueJ and Eclipse) but I was wondering what other more experienced programmers ...
4
votes
1answer
135 views

A very basic JavaScript calculator

I'm just starting out with code. I created a very basic JavaScript calculator. While writing, I couldn't help but think that there must be easier, faster and less redundant ways to write this. For ...
1
vote
1answer
49 views

Simple four-operation calculator in Lua

I'm a beginner at Lua and programming in general and I just made a simple calculator and I was wondering where I could make improvements. ...
5
votes
2answers
93 views

My JavaScript calculator

I am playing a bit with vanilla JavaScript and created a simple JavaScript calculator using eval(). Any suggestions for improvements? ...
7
votes
1answer
138 views

Basic C# calculator code

I have not had any experience with coding before, and after beginning to learn I stated working on this calculator which runs different functions on the console. I'd like to hopefully be taught what I ...
1
vote
1answer
35 views

Speed-Distance-Time Calculator in Rust 1.8

Whenever I try a new language I always try to write a speed-distance-time calculator as well as possible. I did this with C++ a while ago now. This is a similar question but this time in Rust. The ...
3
votes
4answers
142 views

A simple command-line calculator

I created a simple command line calculator, and then after some reading I made a few tweaks and then remade it with a friends idea to make it more simpler. I'm wondering if this can be more optimized ...
2
votes
3answers
58 views

Parabola calculations - follow-up

Previous question After applying the suggestions, I wanted to revise the question with the new code because I don't think this is good enough. ...
8
votes
4answers
1k views

Simple python calculator

I'm very new to Python, and so I'm trying to learn it by doing simple programs, like a calculator. But I don't know if this is the "Pythonic" way to do it, or if I am making beginner errors. So ...
7
votes
2answers
211 views

Parabola calculations

I'm trying to make a small parabola calculator just for fun. Is this code good? ...
4
votes
4answers
260 views

Triangle calculator: calculate if it's a valid triangle and what type

This is my first program and I wanted to know if there was any way to improve the design or cut back on unnecessary coding. ...
3
votes
1answer
30 views

Calculating chmod based on user input [closed]

This program asks the user for input three times, and based on that input, calculates the chmod. I have included comments with questions and clarifications in the code. I would like to have these ...
2
votes
1answer
79 views

Learning JavaScript - calculator

I'm learning JavaScript and as a start I'm trying to create a calculator. ...
6
votes
2answers
309 views

First program: a simple calculator

I'm reading this very good book, C# Player's Guide, to learn C#. I then plan to make video games with Unity 3D after. In one of the chapters, he asks us to make a (really) simple calculator as a ...
3
votes
3answers
122 views

Primitive console string calculator in C

Recenlty I have finished this primitive console string calculator in C. I need your balanced criticism, I'd like to know what I have to correct, remake and learn. Permitted operations: ...
0
votes
1answer
72 views

Stanford developing calculator iOS app assignment

I'm currently learning Swift by following the Stanford developing iOS app 2015 lecture series. I have completed assignment 1 but am wondering if there is any improvement can be made to my code. Also, ...
2
votes
0answers
35 views

Simple native JS Calc

I've never been into web a lot, but I really want to. I started from simple things. I have some experience in .NET and c#. But the world of javascript is completely new for me. I wrote simple ...
2
votes
0answers
99 views

Tiny calculator using dependency injection and inversion of control

I've started to learn very interesting concept of DI, IoC and related stuff. I have decided to learn it using simple application, very tiny calculator (only basic functions: add, subtract, multiply &...
2
votes
3answers
97 views

Javascript Ownership Cost Calculator

Javascript newbie here. I built a total cost of ownership calculator to calculate the cost of a business over 5 years. It has a lot of repeating script and prob way more congested than it needs to be ...
6
votes
2answers
185 views

Beginner's Calculator code

I am trying to learn AngularJS as a start to my revival of learning, I think that I am getting the hang of it so far, but would like to see what I can do differently with some super simple ...
3
votes
2answers
62 views

ECMAScript 6 budget calculator

I never get to use ECMA6 in production/work, so I am hoping you all can help me write better code by reviewing my finished sample: ...
-3
votes
1answer
84 views

Four-function calculator with a text menu

This code works but I don't know if I am doing this correctly. I want to have a do-while loop for the menu and app. How could I ...
4
votes
1answer
79 views

Calculating a postfix expression

I've got the following code in my calculator project: ...
2
votes
1answer
112 views

Beginner PHP calculator

I've spent the last few evenings learning PHP, CSS and HTML through Codecademy and now on Team Treehouse. My goal is to progress with PHP over the next year or two and perhaps obtain Zend cert. ...
8
votes
3answers
1k views

Simple calculator with classes in C++

I came to C++ from Java. This is my attempt at making a calculator on about 2 days worth of knowledge. I don't really know what is redundant or unnecessary. Nor do I know of the better ways to achieve ...
1
vote
1answer
171 views

Simple JavaScript Calculator

I built a simple calculator that supports addition, subtraction, multiplication, and division. It can also chain operations. I'm looking for feedback on my code for places that could be done better in ...
0
votes
0answers
113 views

Calculator in Node.JS

I'm new to parsing, and there's only one way to learn anything, and that's to do it yourself. So I did. I wrote what is essentially a calculator. But instead you will send it a string and it will be ...
5
votes
1answer
909 views

Simple JavaFX Calculator

Good day everyone, I made a simple JavaFX calculator. It does basic calculations, and works to the best of my knowledge. However, I'm a novice at both Java and JavaFX, so I seriously doubt this is as ...
5
votes
2answers
73 views

Simple medication dosage calculator

I am a nurse and I'm learning to code. I have coded this simple tool that helps me doing some common nursing formulas for medication. It works, however I think it is too bulky/redundant. Can you help ...
6
votes
1answer
100 views

Somewhat Advanced C++ Calculator

I am currently in the process of learning C++ from C++ Primer. I have found the exercises in this book to be somewhat dull in that they only test syntax and not reasoning. As such, I have recently ...
3
votes
1answer
201 views

Calculator in HTML, CSS, JS

I am new to Javascript and HTML. I have written code for a calculator, so review my code and points out pros and cons in it. ...
0
votes
2answers
165 views

Basic calculator in Java

I'm new to programming and just made a basic calculator on my own. Can anyone see if there is any room for improvement in the code, like stuff i should do different. ...
14
votes
4answers
1k views

Body Mass Index Calculator

I created a quick calculator in Javascript and I was wondering if there was a way to make the code look prettier or make it simpler. To me, it looks really cramped and messy and I'm not sure how ...
3
votes
1answer
100 views

Simple object-oriented calculator - part 4

This question is an improvement I did based on recommendations from these other questions: Simple object-oriented calculator Simple object-oriented calculator - follow-up Simple object-oriented ...
3
votes
1answer
84 views

Simple object-oriented calculator - part 3

This question is an improvement I did based on recommendations from these other questions: Simple object-oriented calculator Simple object-oriented calculator - follow-up To those looking this ...
3
votes
1answer
72 views

JavaScript calculator for adding discounts on some number of people

I am trying to learn JS and I am trying to make a simple calculator which will calculate price against number of people and will give discount on some amount of people. For instance, every 6th person ...
6
votes
2answers
88 views

Hours:Minutes Addition

I wrote this simple page to help at work, and as an exercise to get more familiar with JavaScript. I'm especially interested in help with style and structure - is this "standard"? I know the input ...
7
votes
2answers
391 views

Calculating the price of movie tickets based on multiple inputs

I have modularized my code and currently my "main" function is movieSalesReport(). I am coming from Python where you can have the functions return multiple values. ...
6
votes
2answers
122 views

Simple object-oriented calculator - follow-up

This question is an improvement I did based on recommendations from this other question: Simple object-oriented calculator JSFiddle ...
23
votes
3answers
704 views

Simple object-oriented calculator

After studying several ways of doing OOP in JavaScript I think I finally came up with one that seems OK to me. Is it okay? Do you see some problems I can face by using OOP in JavaScript like this? ...
15
votes
4answers
1k views

Credit Calculator

The code has been test to work by the parameters listed below I just wanted to know if there were any details that I missed or blatantly overlooked. Develop a Java application that determines ...
3
votes
3answers
197 views

Calculator Program which can operate on multiple numbers

All the calculator programs I have seen so far seem long, complicated and they can only operate on two numbers. I am trying to write one that is simple, short, and it can operate on as many numbers as ...