answersLogoWhite

0

The for loop looks like this:

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

{

...

}

This will repeat anything inside ten times; the variable "i" will have the values 1, 2, ...10. The first part is the initial assignment, the second part specifies a condition - while it is true, the loop should continue, and the third part increments the variable(s).

Replace the "..." with anything you want to repeat 10 times, for example, a System.out.println(...) that involves the variable "i".

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

2x2 matrix multiplication program in 8085 processor?

how to write a program for matrix multiplication in microprocesspr


How would you write a program that read an integer for display each of digit of integer in English?

Use an enum if you are using a c style language. Or a map data structure. Assign each integer an English value and then match it to what the user inputs.


How can I write a program to display prime numbers from 1 to 100?

Write a function that implements an algorithm that checks to see if a particular integer is prime (returning a boolean). Write a program that uses that function on each number from 1 to 100, and if true, displays that number.


Write a program to subtract integer y from integer x?

x -=y;


How Write javascript program to display multiplication table of 2 without accepting input from user?

Use a counted for loop. On each iteration, multiply the control variable by 2 and print the result.


Write a program to display the name of days when a user enters a number?

write a program to display your name age class schoolname e-mail 2hobby based on choice


Write a program to display your name on computer screen?

Faisal


Write an Algorithm for multiplication table of an integer?

int firstNumber,secondNumber for(firstNumber = min; firstNumber &lt;= max; firstNumber++); { for(secondNumber = min; secondNumber &lt;=max; secondNumber++); int result firstNumber * secondNumber; }


How do you write a program to read set of numbers using by an array and display the ascending order of the given input numbers?

To write a C++ program to display the student details using class and array of object.


How do you write 2n in C?

In C, you can write 2n by using the multiplication operator. If n is a variable of an integer type, you would write it as 2 * n. For example, if n is defined as an integer, you can define it as follows: int n = 5; // or any integer value int result = 2 * n; // result will be 10 if n is 5


Write a line of code that asks the python user to input an integer greater than 0 and store this value in a variable and display its value?

integer = input(&quot;Please input an integer greater than 0: &quot;) print(integer)


How you write multiplication program without asterisk symbol?

a*b = exp (ln a + ln b)