subject

// Exercise 4.16: Mystery. java 2 public class Mystery
3 {
4 public static void main(String[] args)
5 {
6 int x = 1;
7 int total = 0;
8
9 while (x <= 10)
10 {
11 int y = x * x;
12 System. out. println(y);
13 total += y;
14 ++x;
15 }
16
17 System. out. printf("Total is %d%n", total);
18 }
19 } // end class Mystery

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:50
Explain why it is reasonable to assume that receiving 3 duplicate acks in tcp is an indication that the network is not currently congested.
Answers: 1
question
Computers and Technology, 22.06.2019 17:00
Your company has 1,500 desktop computers running windows 7. you want to upgrade them to windows 10. which type of microsoft license would be best suited in this situation?
Answers: 3
question
Computers and Technology, 23.06.2019 15:00
1. which of the following statements are true about routers and routing on the internet. choose two answers. a. protocols ensure that a single path between two computers is established before sending packets over it. b. routers are hierarchical and the "root" router is responsible for communicating to sub-routers the best paths for them to route internet traffic. c. a packet traveling between two computers on the internet may be rerouted many times along the way or even lost or "dropped". d. routers act independently and route packets as they see fit.
Answers: 2
question
Computers and Technology, 23.06.2019 18:30
This program should be a short piece of code that prints all of the positive integers from 1 to 100 as described more fully below. the program may contain multiple methods, and if using an oo language, should be contained within a single class or object. the program should be designed so that it begins execution when invoked through whichever mechanism is most common for the implementation language. â–ş print out all positive integers from 1 to 100, inclusive and in order. â–ş print messages to standard output, matching the sample output below. â–ş in the output, state whether the each integer is 'odd' or 'even' in the output. â–ş if the number is divisible by three, instead of stating that the number is odd or even, state that the number is 'divisible by three'. â–ş if the number is divisible by both two and three, instead of saying that the number is odd, even or divisible by three; state that the number is 'divisible by two and three'. â–ş design the logic of the loop to be as efficient as possible, using the minimal number of operations to perform the required logic. sample output the number '1' is odd. the number '2' is even. the number '3' is divisible by three. the number '6' is divisible by two and three.
Answers: 1
You know the right answer?
// Exercise 4.16: Mystery. java 2 public class Mystery
3 {
4 public static void main(St...
Questions
question
Mathematics, 12.05.2021 18:20
question
History, 12.05.2021 18:20
question
Engineering, 12.05.2021 18:20
question
Mathematics, 12.05.2021 18:20
Questions on the website: 13722360