Questions tagged [divide]

Separate or be separated into parts

Separate or be separated into parts

688 questions
-3
votes
2 answers

Divide a string into binary indexes

a = '123712638126378123681273' i have => a = ['12','37', ...... ] I tried to use split but I do not know how to order it help me
-3
votes
2 answers

Python, can't round after division?

I'm new to Python and at the moment I'm writing a code. I need to round up some numbers after I have divided them like this. n = 5 print(round(n/2)) Why is this showing 2 and not 3? It works on 7 and gives 4 but then on 9 it also gives 4 and not 5.…
ClearWhey
  • 3
  • 2
-3
votes
3 answers

Print amount of numbers in array divisible by 3

I'm new to Java and working on a basic program that looks through an array and gives prints the amount of numbers in the array that are divisible by 3. I'm having some trouble getting it to work right. Here is the code that I've got so far. package…
mattj.ware
  • 13
  • 1
  • 1
  • 3
-3
votes
1 answer

Detect if a number is dividable by 100 in NodeJS

I want to detect if a number is dividable by 100 in NodeJS. How can I do this?
stijnb1234
  • 184
  • 4
  • 19
-3
votes
1 answer

Algorithm to divide a list of numbers and summed up >= X million

I got 9 numbers which I want to divide in two lists, and both lists need to reach a certain amount when summed up. For example I got a list of ints: List test = new List { 1963000, 1963000, 393000, 86000, 393000, 393000, 176000,…
Quoter
  • 4,236
  • 13
  • 47
  • 69
-3
votes
2 answers

How to Divide 1 value from input box to 10 another input box divided by 10 without rounding

I am making a form to input Products to warehouse, So, the condition that i want is: When I type and enter a value in Quantity box (Blue circle), I want that value shown to another 10 input boxes pallet list (red circle), But it has to be 69 Pcs in…
-3
votes
1 answer

Divider in a program

I am trying to get a divider in my program, I got it to output however I notice their is a gap on the top. For example my code outputs: ******************************************************************************************* …
sss34
  • 57
  • 9
-3
votes
2 answers

jQuery, change separator to dot and divide two selected numbers

var result = parseFloat($('.lot2').text()) / parseFloat($('span.Price').text()); $('.result').text(result); }); How can I convert selected values from comma separated values to dot separated values? There is this function str.replace, but I don't…
flzen
  • 3
  • 3
-3
votes
1 answer

Dividing one column in my dataset by a fix value in R

Im pretty new to R and here's (maybe a simple) question: I have big .dat datasets and I add together two of them to get the sum of the values. The datasets kinda look like this: #stud1 AMR X1 X2 X3... 1 3 4 10 2 4 5 2 #stud2…
dave_d
  • 1
  • 1
-3
votes
1 answer

how to divide a short value by int in C

I have a short value and I want to divide it by an integer value. How can I achieve this in C? short *i; int divider = 3; fread(i, sizeof(short), inputfile); /*write to buffer with i / divider. */
user3712237
  • 173
  • 1
  • 1
  • 8
-3
votes
3 answers

Divide a number that is being echoed by 2

I'm using a composite product plugin for Woocommerce and Wordpress and am simply trying to make the price echoed in the highlighted line divide by 2 and display that value (the divided value instead of the whole value). Here is the code: …
-3
votes
3 answers

Problems while dividing by 100

Helo, I'm new to programming and run into an issue, I have an integer, for example 158, and I divide it by 100 that i get is 1, but I want 1.58 instead It is probably known issue, but sorry, I'm noob, for now :)
-4
votes
3 answers

How to divide page into multiple colored sections

my question is how can I divide a background into multiple colored sections. I'm pretty new to coding, so if you could maybe give me a brief explanation I would appreciate it. Thanks.
Gavin Craig
  • 9
  • 1
  • 1
  • 2
-4
votes
1 answer

double d = 1000 / 3600; result in to a 0?

I doing a simple calculation from 2 variable and I got in to an issue... In fact when I try to do " double d = 1000 (which is the first var) / 3600 (which is the 2nd var); it result in a 0. So why ? Any hint about that ?
ZeTioZ
  • 1
  • 3
-4
votes
1 answer

how do i dividing the sentence into a word

how do i divide a sentences in c++ like : input from cin (He said, "that's not a good idea". ) into He Said That s not a good idea to test whether a character is a letter, use a statement (ch >='a' && ch <='z') || (ch >='A' && ch <='Z').
1 2 3
45
46