answersLogoWhite

0

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

Still curious? Ask our experts.

Chat with our AI personalities

BeauBeau
You're doing better than you think!
Chat with Beau
JordanJordan
Looking for a career mentor? I've seen my fair share of shake-ups.
Chat with Jordan
DevinDevin
I've poured enough drinks to know that people don't always want advice—they just want to talk.
Chat with Devin

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.