All Questions
177
questions
0
votes
0
answers
44
views
"*/" as a data conversion operator
I am currently reverse engineering a SQL database for in-car communications over a CAN network. Specifically, this is from the internal database of Volvo‘s VIDA diagnostics program.
There is a table ...
-1
votes
1
answer
58
views
How to divide int * type? [closed]
I'm trying to find from input to if is "Armstrong Number" or not. Here's my code. Probably I have another arrow but I can't divide (/) or multiplication (*) with int * variables. Why is ...
1
vote
2
answers
71
views
Generating random equations with wrong answers ( operator precedence problem )
I am trying to generate a random Equation and an answer to it.
Everything works fine, except the answers are being calculated wrong ( without consideration of operator precedence ). I've been trying ...
0
votes
1
answer
40
views
Get an unexpected output when I try to use simple math operators in C [duplicate]
I just wanted to test simple operators in different data types in C and there is an unexpected output
INPUT
printf("%.2f \n", 10.0 + 4.0 + 5);
printf("%d \n", 10 + 4);
...
0
votes
2
answers
67
views
How do I get this mathematical rounding?
This is what I see in an official tool, and I need to calculate the same end value:
For clarification:
I am given the numbers 95, 3, 5, 19 and 17.15.
I am trying to replicate a math formula in VB.NET ...
-1
votes
2
answers
108
views
Square root of negative [closed]
I'm a bit puzzled by these results:
result of calculating sq rt of negative number
Can someone explain what's going on?
-3
votes
1
answer
65
views
| ,^, <<= , >>= Mathematical Operations in python [duplicate]
I have tried to find out about these operations in Python:
x|3
x^3
x>>=3
x<<=3
I couldn't find anything. Please can anyone tell me what are these operations are called, so that I can ...
0
votes
2
answers
85
views
python - weird results with exponent operator in idle
I'm getting a strange result when squaring -1 in idle. What's going on?
Unexpected result:
>>>| -1 ** 2
>>>| -1
Expected result:
>>>| pow(-1,2)
>>>| 1
>>&...
0
votes
0
answers
31
views
A simple math program in c is giving the wrong answer. Where is the error? [duplicate]
The following code should output: 2.000000, but it gives -0.000000.
Where exactly I am getting things wrong?
#include <stdio.h>
#include <math.h>
int main(int argc, char const *argv[]) {
...
-1
votes
1
answer
87
views
Javascript double ** opertator in math [duplicate]
can somebody explain me please what this line of code is actualy doing?
console.log(2 * 3 ** 4)
Thanks for help.
0
votes
1
answer
952
views
How do I make my calculator accept multiple values and multiple operators before pressing the equal button?
I'm a newbie in VB.NET so I followed a tutorial. The current code only takes the first value, operator, and then the second value before I press the equal button. It's working as intended. But I want ...
0
votes
1
answer
48
views
Javascript if, else, else if, logical operators problem [duplicate]
Why is that not working?
So, I have a problem with my javascript code and i don't know why my code isn't working.
Maybe i don't see a problem. I need a help.
I've tried everything, i don't know why my ...
-1
votes
1
answer
1k
views
Can we use Arithmetic Operators ( + - * / ) in Switch Statement in PHP?
I was trying to make a calculator and wanted to use Arithmetic Operators in the switch Statement but i am not able to.
Can someone help me out.
Error:
Warning: Undefined array key "num2" in ...
2
votes
2
answers
207
views
Arithmetic operators
As you know there are arithmetic operators like + or -.
Is there a way to create my own operator which can execute a specific task between two variables?
For example:
a, b = 2, 5
a '+' b == 7
What I ...
0
votes
2
answers
279
views
Why is x / 100 == 0 when x != 0 in swift? [duplicate]
I have created a for loop in which I calculate a few values.
for i in 1...100{
let xValue = i/100
print(xValue) // returns 0 every time except when i == 100
}
This is a recreation of a part of ...