Questions tagged [calculator]
Questions about calculators, or calculator programming. For TI-BASIC calculator programming, use the ti-basic tag.
calculator
4,641
questions
0
votes
3
answers
68
views
Textbox in calculator not updating when button clicked
This code is working fine to develop the GUI but whenever I click a button on GUI, nothing happens, no changes occur to textbox. I checked if the functions are being called by using print statements ...
1
vote
2
answers
109
views
simple calculator program exiting unexpectedly after input (C, MinGW)
'm trying to write a basic calculator program in C using MinGW. However, the program exits unexpectedly after I enter the operator (+, -, *, or /). I've checked for common errors like missing return 0;...
0
votes
3
answers
69
views
Cannot get the clear button to work within my calculator
I've just gotten into programming and I tried to figure out how to create a calculator using tkinter and I couldn't for the life of me get the clear button to work. Every other button works, but the ...
1
vote
1
answer
69
views
Why GCP calculator asked me to specify region when using GLOBAL cloud balancer?
I have this architecture:
One backend with two MIGs with different regions, asia-southeast and europe-central.
When I want to calculate Cloud Load Balancer in GCP, it asked me to specify the REGION ...
1
vote
1
answer
32
views
I don't know how it works to execute events when clicking buttons on a calculator from a code I found
I found this calculator code on Github and wanted to know how it works to execute events when clicking buttons.
The "button_click" method appears in the code, but I don't understand how it ...
0
votes
1
answer
117
views
How can i add a negative number to the displayArray?
I am trying to create a calculator and unable to calculate negative numbers because my current logic splits displayValue which is a string using regular expressions(Regex) to separate numbers and ...
0
votes
0
answers
21
views
raster calculator giving unexpectedly large and integer results
I am trying to divide one raster ("s05") by the other ("d_05") and the resulting raster ("SdivD") is giving me some suspicious values.
I am using ArcMap. The raster s05 ...
0
votes
0
answers
19
views
How to set precision of a label through python console in QGIS
I want to do a raster calculation through a python script and I want to apply some changes: for example I want to disply the new layer with Quantile mode and 35 number of classes. But also I want to ...
-1
votes
1
answer
54
views
Code for calculating large numbers. Please rate if there are any unnatural parts [closed]
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int compare(char* num1, char* num2) {
int length1 = strlen(num1);
int length2 = strlen(num2);
if (length1 <...
1
vote
1
answer
31
views
The result of my assembly language code is 0 and there's an error on division
I tried to make calculator using assembly language, here is my code:
.model small
.stack 100h
.data
greeting db 'WELCOME TO YOUR CALCULATOR', 0Dh, 0Ah, '$'
menu db '1 - ADDITION', 0Dh, 0Ah, '...
1
vote
2
answers
39
views
Create a variable price calculator where more hours = more discount | Google Sheets
I want to be able to enter a single variable of 'hours' and return a result of 'price' where more hours = higher discount
Here is my sheet with the % discount:hours = price
https://docs.google.com/...
1
vote
1
answer
30
views
error in displaying result and executing the chosen arithmetic operation
.model small
.stack 100h
.data
greeting db 'WELCOME TO YOUR CALCULATOR', 0Dh, 0Ah, '$'
menu db '1 - ADDITION', 0Dh, 0Ah, '2 - SUBTRACTION', 0Dh, 0Ah, '3 - MULTIPLICATION', 0Dh, 0Ah, '4 - ...
1
vote
2
answers
57
views
How can i make my code rerun after Ending?
switch(choice) {
case 1:
double sum = 0;
for (int i = 1; i <= 5; i++) {
System.out.println("Enter " + i + "th number: ...
0
votes
1
answer
47
views
Click event doesn't happen until I click the button 2-3 times
I am writing a calculator for ADHD medication dosages. However, when I press "Convert!" I have to click it several times for the placeholder text to appear. What's going on? Nothing I try ...
1
vote
1
answer
39
views
How to add math function without eval to basic calculator
Per the Odin Project's instructions, I need to make my basic calculator operate via math functions rather than using eval(). https://www.theodinproject.com/lessons/foundations-calculator
I've only ...