answersLogoWhite

0

Easy. Change any + to -, any += to -=, any ++ to --

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What type of loop can either increment or decrement the loop control variables value?

Counting Loop


For loop in c language?

for(assigning initial value;condition;increment/decrement) { statement; }


Why are increment and decrement used in c?

To increment or decrement a value


What are three components that control the loop?

The three main components that control a loop are the initialization, the condition, and the increment/decrement statement. Initialization sets the starting point of the loop, the condition determines when the loop should continue running, and the increment/decrement statement updates the loop variable to progress towards the termination condition. Together, these components ensure that the loop executes the desired number of times and eventually exits when the condition is no longer met.


How many times does a for loop run in a typical iteration?

A for loop typically runs a specific number of times in each iteration, as determined by the loop's initialization, condition, and increment/decrement statements.


Which arithmatic operations can be performed on pointers?

Increment and decrement only.


What is well-formed for loop?

A well-formed for loop is a control structure in programming that iterates over a sequence, typically defined by an initialization statement, a condition, and an increment/decrement expression. For example, in the syntax for (initialization; condition; increment), it first executes the initialization, then repeatedly checks the condition before each iteration, and finally updates the loop variable with the increment expression. The loop continues until the condition evaluates to false. Properly managing these components ensures the loop operates as intended without errors such as infinite loops.


How can you offset a pointer in C?

Increment or decrement the pointer by the required offset.


How do you exit in nested loop in java?

You may exit a nested loop in Java using a break with a label for the outer loop.


What is the best iteration loop and why?

There is no best loop. All the loops have some special functionality which when used properly will provide great results. Here's my opinion on the three loops:for and while loop:These are entry controlled loops. In case of a for loop; initialization, condition and increment/decrement is done together inside the parenthesis. For loops are best suited for purposed where the number of iterations are fixed. In case of a while loop; initialization, condition and increment/decrement are done separately. These are best suited for purposed where the number of iterations are unknown.do-while loop:This is an exit controlled loop. Hence it is best suited for purposed where you want a set of statements to be executed despite the loop condition being false.


What is auto increment and auto decrement mode?

access and update in one instruction.


In C which loop is embedded within another loop?

The nested loop.