Questions tagged [divide]

Separate or be separated into parts

Separate or be separated into parts

688 questions
-4
votes
4 answers

Division without using '/' operator

I cannot use '/' and loops and I have to divide some numbers. operands are 32-bit and I can't use recursion. I thought of using shr but it only gives me 2^n divison and it also won't save the reminder. any Ideas?
Dorni
  • 699
  • 1
  • 5
  • 13
-4
votes
2 answers

Performing a double divide in sql

I am trying to double divide but I am getting no results. The following is an example: 6.82 / (X/NULLIF (Y,0))
-4
votes
1 answer

Complex Division

I'm having a problem with the output of my division. When I enter both real parts of 5 and 3 and imaginary parts of 4 and 2, I get 2.000000 + -2.000000i instead of 1.769231 + 0.153846i. Here's the case for dividing in the main program: case 4: …
JadC
  • 19
  • 5
-4
votes
1 answer

int divide float in assembly

alghoritm code I write implementation Shell sort in assemble. My problem is at end this code. I have number in EAX and I want do this. EAX=EAX/2,2
Vojta Matras
  • 69
  • 1
  • 8
-4
votes
3 answers

Divide Swift String into groups of 3 symbols

I'm making a formatter for currency string, for example I have Int: let a: Int = 10 let b: Int = 10000 let c: Int = 10000000 I want them to be formatted like: let a1:String = "10" let b1:String = "10 000" let c1:String = "10 000 000" So I need…
katleta3000
  • 2,484
  • 1
  • 18
  • 23
-4
votes
1 answer

How to find the difference between two variables in python 3.3.2

I have been creating code for a small game for a project and have run into a small error which I can't fix, so I was wondering whether someone can help me. The code needs to find the differences between two variables input by the user, here is the…
Charlie1995
  • 29
  • 1
  • 7
-4
votes
1 answer

Not able to fix error

This is my program. I don't know where im dividing by zero so i cannot fix this error. Exception in thread "main" java.lang.ArithmeticException: / by zero This program is supposed to reverse any number's digits. ex. 57823 --> 32875 I can't get that…
-4
votes
1 answer

x86 assembly - masm32: absolute breakdown of multiplication and division

I have looked all over the internet for a simple-to-understand evaluation of how to multiply and divide in masm32 assembly. My questions are: Where should I place the numbers being multiplied? Where should I place the numbers being divided? Where…
Progrmr
  • 1,575
  • 4
  • 26
  • 44
-5
votes
1 answer

Java how to divide very large numbers

Please tell me how to divide the numbers by the column, but taking into account the fact that the numbers in the method will be transferred by the type String (the number to be divided, the number to which to divide). Because numbers can simply be…
AC_NONE
  • 5
  • 2
-5
votes
3 answers

divide time 0900 to 09:00

If I enter 0900 in this text field then I would like it to automatically turn into 09:00 form

Error in…
Graham
  • 1,850
  • 4
  • 21
  • 41
-6
votes
1 answer

How to detect division by zero using std::error_code

I want to detect division by zero using std::error_code. Without the use of exceptions. How can I do that? Write some simple examples.
ANurbaev
  • 17
  • 3
-6
votes
2 answers

How to modulus using java?

First 300 meters is 20 fee, succeeding 200 meters is 2 fee. I want to compute distance in meters. input: 300 output: 20 input: 500 output: 22 input: 700 output: 24 public static void main(String [] args){ Scanner sc = new Scanner(System.in); …
-7
votes
1 answer

How do i divide a string or int in c# WinForms?

I am trying to get a value of trackbar / slider, divide it by 100 and display the value in label. I get an error Operator '/' cannot be applied to operands of type 'int' and 'string'. Here's my try: private void siticoneTrackBar1_Scroll(object…
Ondřej
  • 11
  • 1
1 2 3
45
46