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
-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…
-5
votes
1 answer

Perl illegal division by zero at -e

I am running the following script: # Usage: sh hmmscan-parser.sh hmmscan-file # 1. take hmmer3 output and generate the tabular output # 2. sort on the 6th and 7th cols # 3. remove overlapped/redundant hmm matches and keep the one with the lower…
SAAD
  • 27
  • 6
-5
votes
1 answer

How to show error when dividing by zero c++

I'm trying to create simple calculator. It works just fine for every operator except for '/'. But when num2 = 0 program stops completely. I've tried using conditional statements to output error message when num2 = 0, but it's not working. Here's…
user15417597
-5
votes
2 answers

Sum from random list in python

I have created a random list of 60 numbers, I don't know the numbers contained in the list. I'm asked to find any combination of three numbers from the list that sum to zero. What can I do? That's my code: import random import itertools result =…
-5
votes
1 answer

convert 0 into string

i'm working on a script in perl. This script read a DB and generate config file for other devices. I have a problem with "0". From my database, i get a 0 (int) and i want this 0 become a "0" in the config file. When i get any other value (1,2,3,…
hurikan
  • 43
  • 4
-5
votes
3 answers

In SQL , Instead of NULL values , I need to show user defined values

I don't know how to do this, Please anyone help me on this?
-5
votes
3 answers

Is zero (0) an even or odd number?

Not a request for code of any type. Let's say you are randomly generating a number between zero and ten and are doing so until you receive just an even number. Is zero an available result? Are the evens 0-10: 2, 4, 6, 8, 10 -OR- 0, 2, 4, 6, 8, 10
user3223880
  • 65
  • 1
  • 10
-5
votes
1 answer

I want to calculate the first and last indices of zeros which occur contiguously across a column of a matrix

Say, I have the matrix x as x=[1 5 0 6 0;2 6 0 3 0;0 0 5 5 0;0 0 0 8 9;0 0 0 0 8]; Hence x = 1 5 0 6 0 2 6 0 3 0 0 0 5 5 0 0 0 0 8 9 0 0 0 0 8 The result…
-6
votes
1 answer

C# How to replace 0 (zero) with space

I want to replace 0 (zero) with space in Nr string variable: return new FaultEntity() { Nr = token[0]=="0"?" ":token[0], ... }; If Nr = '0' i want to replace with space, replacing simple Nr = token[0] in collection. I think that can be…
popad
  • 13
  • 1
  • 7
-10
votes
3 answers

Why is a user entered variable resulting in 0 - C?

I'm a very experienced Java programmer with a background in C++, but I'm just getting started with C in one of my programming classes and it's driving me nuts. This is the first assignment. It's supposed to calculate the volume or surface area of a…
rphello101
  • 1,671
  • 5
  • 31
  • 59
1 2 3
70
71