answersLogoWhite

0


Best Answer

Store the absolute value of the desired integer in a variable. Multiply the absolute value by two. Substract the new integer by the old integer.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you turn a positive integer into a negative integer in programming?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

If you start at the negative end of the battery what will happen to the electrons when a closed circuit turn on a light?

When you start at the negative end of the battery, you start to lose electrons and the circuit is closed.


How do you make your universal remote turn on and off any tv without programming it to the tv?

Universal remotes need to be programmed to the T.V. in order for the remote to work on the T.V.


Why is programming language named C?

C derives from a programming language called B, that existed before it. Since C was something of a successor to it, to indicate the advancement from B., the language is called C, the next letter.


Why do you have high level programming language?

High level programming languages offer a very high ratio of machine instructions over language expressions. In other words, a few high language statements can accomplish a lot, allowing the programmer to focus on solving the specific application's problem rather than reinventing the proverbial wheel or spending time with software engineering housekeeping duties.


Can a baby be born with a negative blood type if both parents have a positive blood type?

and and one from their father, which get passed from generation to generation.... all babies get genes from their parents, who in turn got genes from their parents... -all- of your genes came from your parents, if your parents don't have the gene, you can't get it. (unless you're a mutant) Hair and skin color are complicated because there are lots of different genes that control it, which is why we have so many shades of colors of hair and skin color. But the Rh factor is simple, just two options + or -. If you are Rh-, then you are - - (one negative came from mom and one from dad). If you are Rh+, then you are either + + or + - (it only takes one positive to make you positive) If both parents are Rh+ and have mixed genes (+ -), then it is possible that each of them will give the - gene to their child, making the child Rh- (- -). (there is a 25% chance that the child will be Rh- and 75% chance that the child will get a positive from either one or both parents) If one parent is Rh+ and has 2 positive genes (+ +) then it doesn't matter what the other parent is, all the children will be Rh+ Here is another website that may be able to help ans some quest: http://www.thetech.org/genetics/ask.php?id=114 So, to answer your question. Two Rh+ parents can have an Rh- child..... but the negative still came from the parents.

Related questions

How do you turn 6 into a positive integer?

(6)


Can a positive pregnancy test turn negative?

No , but a negative test can be a false positive .


If a positive is divided by a negative what does it equal?

It will turn into A negative number.


Do positive number turn into negative?

No, they cannot. The result of some operations on positive numbers can be negative.


What could i do to turn my child's negative attitude into a positive one?

To turn a negative attitude into a positive one it is important to lead by example. A child will watch you and if they see you being positive they will also be positive.


How do you remove parentheses preceded by a positive sign and a negative sign?

you turn everything inside the prenthises positive or negative


How do you solve a positive number with a negative exponent?

turn the positive number into its recipricol and the put the number of the negative number on the top


How do you get the steam battery workin on poptropica steamworks?

the very first number is negative. turn that one to the negative underneath it. then turn that on to a negative 2. finally turn that one to the positive 2 then turn


How does your brain turn a negative image into a positive?

because it just does


What is the rule for multiplying a negative times a positive number?

If two numbers are multiplied and one of them is negative, the answer will turn out negative. If the two numbers being multiplied are either both negative or both positive, the answer will turn out positive. Example: -2 * 2 = -4 -2 * -2 = 4 2 * 2 = 4


What is a negative minus a ngeative?

a negative + negative = negative (ex. -10+-10=-20) a positive + negative = a positive or a negative depending on how high the negative number is (ex1. 10+-5=5 , ex2. 10+-15=-5) a positive + positive = a positive "obviously" (ex. 2+2=4) a negative - negative = positive (ex. -5--10=5) because the minus sign and the negative sign automatically turn into an addition sign.


Is a negative number minus another negative a positive number or a negative number?

the answer is negative number It depends on the second number because in 6minus-7. the seven would turn positive and therefore the answer is positive. Because you would add the opposite.