answersLogoWhite

0

That would depend on how exactly you define the three parts of the for loop. A typical for loop, equivalent to "for i = 1 to 10" in other languages, would look like this:

for (int i = 1; i <= 10; i++)
{
...
}

If you change this to:

for (int i = 1; i <= 1; i++)

then the code would still execute once.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Which keyword is used to declare constants and variable?

Constants are defines using the final keyword.Variables are defined using the one of the keywords:charbooleanintdoublelongintStringTo use a constant you would have to put in something likedouble final pi = 3.14;


If selling prices sales mix and cost structure remain the same do profits and sales increase using variable costing?

Equal


True or false The key to using the elimination method is to find variable terms in the two equations that have equal or opposite coefficients?

True


How do you solve an or problem if a variable is unrestricted in sign?

Solve the problem using the + sign for the variable. Then solve the problem using the - sign for the variable. Report your answer as the answer that you got using + or the answer that you got using -.


What is the difference between a constant and a variable in java programming language?

A constant in Java is defined using the "final" modifier. For instance: final double Density_Of_Water = 1.000; would set Density_Of_Water to 1.000. This value can not be modified throughout the program because "final" told the compiler that this value would not change. A variable however, can be changed by the user throughout the program.


What variable do you change when using the scientific method?

The independent variable


What happens to the final concentration of H2SO4 if there is an air bubble in the pipette?

Using a pipette with air bubbles leads to errors.


How to display a variable in PHP using echo or print statements?

displaying a variable in php using echo statement? &lt;?php $name="ram"; //declaring and defining the variable echo "$name"; //printing the variable using echo command ?&gt;


Make a sentence using hypothesis controlled experiment and variable?

Make a sentence using hypothesis, controlled experiment and variable. Make a sentence using hypothesis, controlled experiment and variable.


A sentence using the word independent variable?

We used 3 kinds of soaps in the experiment, which each was an independent variable.


What is the name of the variable that describes data using words or numerals as labels?

The variable that describes data using words or numerals as labels is called a categorical variable.


Sentence using variable?

I have variable hours of work; today I will leave early.