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

15y 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.


Why do robots need to be programmed?

Technically, robots don't need to be programmed, but it will be harder to get full functionality otherwise. Programming allows you to give the robot a series of commands to operate it. These commands can include, but are not limited to: Movement, sight, audio, sensors and operation of ulterior tools.However, that is not the only way to get a robot to move. Technically you could go to the fundamental level, and wire a robot in such a way as to force it to certain actions. However this can be considered an extremely low level programming. The earliest computers for example, back when they were vacuum tubes, weren't really "Programmed", and it takes no programming to get a LED to turn on with a breadboard. Using logic gates, it is possible to have a fully wired robot without any programming.

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.