answersLogoWhite

0


Best Answer

Assuming you mean Visual Basic then:

I really do not know much computer programming, but could you not write something along the lines of:

dim x as integer

dim y as string

If x = 0 then

y = "neither"

Else

If x > 0 then

y = "positive"

End if

If x < 0 then

y = "negative"

End if

End Else

End if

Then if you set the x variable to the number you are interested in the code will set the y variable to "neither", "positive" or "negative".

Hope that perhaps helps a little.

P.S. This answer can't be indented as you would normally do to make the code more readable.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you find the given number is positive or negative in VBprogram?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Math & Arithmetic

Which set of numbers is the positive root of the given number NOT a member?

Negative numbers.


What does negative plus positive equal to?

In math when you are given a negative and a positive number, you should write down the sign of the greatest number and subtract the smaller number from the greatest number. In the problem 3 - 9, three is the positive number, and nine is the negative number. This means you should write down the negative number's sign and subtract 3 from 9, and your answer should be -6.


Is number of days absent from school and the mark in the examination a positive and negative or no correlation?

No correlation. The mark you get in your exam, relates to the number of correct answer you have given. It has nothing to do with your class attendance.


Will the sum of two integers always be negative?

No. For example, 2 + 3 = 5 which is positive, and 2 + (-2) = 0 which is neither positive nor negative. Well, that completely discredits my 4th grade math book that said any number that is not negative IS positive. Therefore, zero is by default a positive number. However, the sum of two negative integers will always be negative. Adding a negative integer decreases the value of the result and given that both integers are negative implies that the sum will be negative. "Implies"? you say. Do you have no conviction? Cannot you say 'determines' when it is obvious? "not obvious"? you say, Then does that mean the sum of 2 negative numbers MIGHT not be negative? See, this is what happens when a 5th grade question is answered by someone with superior attitude.


What is the additive inverse of a negative number?

Additive Inverse would be the number that when added to a given number creates a total of zero. The additive inverse for any negative number would be the positive counterpart. The additive inverse of -5 is 5. The additive inverse of -2 is 2, since -2 + 2 = 0.

Related questions

When you add a positive number by a negative number will it be negative or positive?

That depends on the values of the given numbers but a positive number multiplied by a negative number will be negative


What are positive factors?

A factor is a number or quantity that when multiplied with another produces a given number or expression. A positive factor is a factor that is positive, as opposed to negative.


Which set of numbers is the positive root of the given number NOT a member?

Negative numbers.


What is a positive factor?

A factor is a number or quantity that when multiplied with another produces a given number or expression. A positive factor is a factor that is positive as opposed to being negative.


What does negative plus positive equal to?

In math when you are given a negative and a positive number, you should write down the sign of the greatest number and subtract the smaller number from the greatest number. In the problem 3 - 9, three is the positive number, and nine is the negative number. This means you should write down the negative number's sign and subtract 3 from 9, and your answer should be -6.


Is negative blood compatible wiyh positive blood?

Negative blood can be given to someone with positive blood. Positive blood CANNOT be given to someone with negative blood.


Why is square root of the number -9 not a real number?

For the same reason that the square root of ANY negative number is not a real number.Real numbers are positive, negative, or zero. * The square of a positive number is a positive number. * The square of a negative number is a positive number. * The square of zero is zero. In other words, in no case will you get a REAL number whose square is a negative number. The square roots of negative numbers are said to be "imaginary" - a name given for historical reasons. They are just as "real" or "unreal" as the so-called real numbers, but the point is that they are a different kind of numbers.


Make a flowchart that will determine if the given number is positive or negative?

There are many software programs that will allow a person to make a flowchart to determine if the number is positive or negative. The person could use Open Office, Microsoft Word, Microsoft PowerPoint, or Microsoft Excel.


Given the trinomial where both the first sign is positive and the second sign is negative the signs of the factors will be?

One positive one negative (apex)


Is number of days absent from school and the mark in the examination a positive and negative or no correlation?

No correlation. The mark you get in your exam, relates to the number of correct answer you have given. It has nothing to do with your class attendance.


Are longitudes in Madegascar positive or negative?

Neither, they are East. On computer systems longitudes West are represented by being given as negative, so they would be represented by being positive.


What does it mean when you have a positive ion and a negative regarding electrons?

If an atom has equal number of protons and electrons it is neutral.If electrons are given out it has a possitive charge.If electrons are gained it has a negative charge.This way atoms become chemically stable.