Transcribed Image Text: Using a for Loop NewMultiply.java 1 // NewMultiply.java – Ts program prints the numbers 0 through 10 along

Excerpt
you have completed your program, click the Submit 24 button to record your score. 25 26 // Ts is the work done in the endOf Job() method System.exit(®); } // End of main() method. 27 28 29 30 } // End of NewMultiply class. 31

Transcribed Image Text: Using a for Loop
NewMultiply.java
1 // NewMultiply.java – Ts program prints the numbers 0 through 10 along
2 // with these values multiplied by 2 and by 10.
3 // Input: None.
4 |/ Output: Prints the numbers 0 through 10 along with their values multiplied by 2 and by 10.
Summary
In ts lab the completed program should print the
5
numbers O through 10, along with their values multiplied
by 2 and by 10. You should accomplish ts using a for
7 public class NewMultiply
8 {
loop instead of a counter-controlled wle loop.
public static void main(String args[])
{
10
Instructions
11
12
String headl = “Number: “;
1. Write a for loop that uses the loop control variable
13
String head2 = “Multiplied by 2: “;
14
String head3 = “Multiplied by 10: “;
to take on the values 0 through 10.
// Numbers 0 through 10.
// Stores the number multiplied by 10.
// Stores the number multiplied by 2.
final int NUM_LOOPS = 10; // Constant used to control loop.
15
int numberCounter;
2. In the body of the loop, multiply the value of the loop
16
int byTen;
17
int byTwo;
control variable by 2 and by 10.
18
3. Execute the program. Is the output the same?
19
// Ts is the work done in the housekeeping() method
System.out.println(“0 through 10 multiplied by 2 and by 10” + “\n”);
20
21
Grading
22
// Ts is the work done in the detailLoop() method
// Write for loop
23
When you have completed your program, click the Submit
24
button to record your score.
25
26
// Ts is the work done in the endOf Job() method
System.exit(®);
} // End of main() method.
27
28
29
30 } // End of NewMultiply class.
31

Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadline.


Click Here to Make an Order Click Here to Hire a Writer