subject

Lab 5-3 Using a for Loop

The completed program should print the numbers 0 through 10, along with their values multiplied by 2 and by 10. However, in this lab you should accomplish this using a for loop.

1. Open the source code file named NewMultiply. java using Notepad or the text editor of your choice.

2. Write a for loop that uses the loop control variable to take on the values 0 through 10.

3. In the body of the loop, multiply the value of the loop control variable by 2 and by 10.

4. Save this source code file in a directory of your choice, and then make that directory your working directory.

5. Compile the source code file NewMultiply. java .

6. Execute the program. Is the output the same as Lab 5-1?

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 09:00
Design a class tictactoe that: holds the following information about the game: two-dimensional array (3 by 3), and winner. add additional variables as needed. includes the functions to perform the various operations on objects. for example, function to print the board, getting the move, checking if move is valid, determining if there is a winner after each move. add additional operations as needed. includes constructor(s). write the functions of the class, and write a program that uses the class. the program should declare an object of type tictactoe. the program will create the board and store it in the array. the program will allow two players to play the tic-tac-toe game. after every valid move update the array, check if there is a winner. if there is no winner and no tie, then print the board again to continue.
Answers: 2
question
Computers and Technology, 23.06.2019 20:00
Match the file formats with the types of multimedia they can store
Answers: 2
question
Computers and Technology, 24.06.2019 10:00
Which feature of a blog to restore and retrieve older post
Answers: 3
question
Computers and Technology, 24.06.2019 21:40
Which of these is not a type of socket? aga (alternating grid array) pga (pin grid array) spga (staggered pin grid array) lga (land grid array)
Answers: 1
You know the right answer?
Lab 5-3 Using a for Loop

The completed program should print the numbers 0 through 10, a...
Questions
question
Mathematics, 12.10.2020 17:01
question
Mathematics, 12.10.2020 17:01
question
Biology, 12.10.2020 17:01
question
Mathematics, 12.10.2020 17:01