Questions tagged [zero]

Zero is a unique number and along with 1 is one of the two binary numbers. Zero plays an important role in Mathematics and Computing. This Tag is for discussions of zero within various programming languages.

Zero is a unique number and along with 1 is one of the two binary numbers. Zero plays an important role in Mathematics and Computing. This Tag is for discussions of zero within various programming languages.

1060 questions
-3
votes
6 answers

What value is stored in an initialized but empty int array in Java

I made the following array: int[] array = new int[9]; This array is initialized, but empty. In that case, what is the value of any index of this array? When I print it out, it gives me 0. Does that mean there is a zero stored in here (like if you…
cvbattum
  • 811
  • 2
  • 15
  • 32
-3
votes
5 answers

Why does the % function not work in this case?

Here is some code I have been working on to find a list of prime numbers (bear in mind I am fairly new and I know this will seem over…
ollie stubbs
  • 101
  • 1
  • 6
-3
votes
1 answer

return number of zeros in javascript

How do you return the number of zeros in an array in JavaScript? For example this array has numbers [ 2, 3, 0 , 9, 0] and it should output to 2 zeros. Thanks for responding! I'm still a newbie at JavaScript.
-3
votes
4 answers

C# - Zero Based String error

It comes up with this error when I try to login. Index (zero based) must be greater than or equal to zero and less than the size of the argument list. public partial class Form1 : Form { public Form1() { InitializeComponent(); …
Mr.B
  • 15
  • 7
-3
votes
5 answers

How do you make a for loop to always print zero in the beginning, without having a zero element as a first element?

I tried: mylist=[1,2,3] for i in mylist: time=0 time=time+i …
user2259323
  • 1,339
  • 2
  • 9
  • 3
-3
votes
2 answers

"Division by zero" error in a nested for loop

The purpose of this script: Write a script that counts from 1 to 10 in steps of 1. For each number, display whether that number is an odd or even number, and also display a message if the number is a prime number. Display this information within an…
Jermin Hu
  • 3
  • 3
-3
votes
5 answers

How to account for non-prime numbers 0 and 1 in java?

I'm not sure if this is the right place to be asking this, but I've been searching for a solution for this on my own for quite some time, so hopefully I've come to the right place. When calculating prime numbers, the starting number that each…
shady
  • 73
  • 1
  • 4
-4
votes
2 answers

I am having a hard time converting fluid dynamics equation into MATLAB code

I converted these two equations into MATLAB code before but I lost the file and now I am trying to write them again but there is a problem and I can't figure it out. This is the main equation: This is the equilibrium radius equation: This is the…
-4
votes
1 answer

How to enforce that 0 not equal to 00 or 000 Python 3.8.5

----------------------------------------/ i = 0 x = 00 list1 = [(3000,2,1), (9000,0,8), (4,5,6, 000)] a = (len(list1)) while (True): if (x in list1[i]): print ( list1[i]) -------------------------------------------------/ This will print:…
user176105
  • 19
  • 6
-4
votes
1 answer

Browse and compare two arrays

I need to compare an array that comes from a query, with a base array where I have the values that could have the array that comes from the query, the question is how to go through and compare the two arrays so that I get zero where the values do…
Dave
  • 17
  • 5
-4
votes
1 answer

Check if ZF is 0 or 1?

I used the int 16h interrupt, and I want to check if keystroke is available or not. So I want to check what value the Zero Flag has - how can I do it?
Yair Haimson
  • 1
  • 1
  • 3
-4
votes
4 answers

How do I generate a division operation where its result will have remainder 0(zero)? JAVA/Android

I tried to develop the function in one way, but after multiple failed tests I created another way, but it keeps not generating what I'm searching for. I'm focusing only on 'Easy Division'. The outputs appeared are like 7/2; 9/9; 9/8; 5/2;, and what…
volkel
  • 1
  • 1
-4
votes
1 answer

R : how to get rid of all NaN values and replace them by 0 in a complex function / R file

How is it possible to get rid of all NaN values and replace them by zero (0) in a complex function / whole R file?
jdsfj3
  • 1
  • 3
-4
votes
3 answers

How to replace duplicates in array with 0 in C

I have to Write a program that will read in a list of numbers and will then print out the same list except numbers that have already been printed will be printed as a zero instead. #include int main() { int n, list[100],i,j,k; …
DX Sparta
  • 1
  • 1
  • 4
-4
votes
1 answer

Find all zero(s) in matrix in matlab

Please help me I want to find all zero elements in matrix in MATLAB. For example, if matrix A = [1 3 0; 2 4 9; 2 0 7] the answer should be (1,3) and (3,2). But the real matrix I want to solve is very big. Is there any way to do this.
Yossiri
  • 35
  • 1
  • 1
  • 8
1 2 3
70
71