1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
svet-max [94.6K]
3 years ago
5

Provide trace tables for these loops. a. int i = 0; int j = 10; int n = 0; while (i < j) { i++; j--; n++; } b. int i = 0; int

j = 0; int n = 0; while (i < 10) { i++; n = n + i + j; j++; } c. int i = 10; int j = 0; int n = 0; while (i > 0) { i--; j++; n = n + i - j; } d. int i = 0; int j = 10; int n = 0; while (i != j) { i = i + 2; j = j - 2; n++; }
Computers and Technology
1 answer:
Eduardwww [97]3 years ago
3 0

Answer:

Following  show the trace table.

Explanation:

a)

int i = 0; int j = 10; int n = 0;

while (i < j) { i++; j--; n++;

}

i                  j             n

1                  9           1

2                 8           2                                              

3                 7            3

4                 6            4  

5                5             5                                                

b)                  

int i = 0; int j = 0; int n = 0;

while (i < 10) { i++; n = n + i + j; j++;

}

i                j             n          

1               1             2

2              2            4

3              3            9      

4              4            16

5              5            25

6              6           36

7               7           49

8               8           64

9               9           81

10             10          100

c)

int i = 10; int j = 0; int n = 0;

while (i > 0) { i--; j++; n = n + i - j; }

i              j           n

9            1           8

8           2           14  

7            3           18

6            4          20

5            5           18

4            6           14

3           7            8

2           8            0

1            9           -10

d)

int i = 0; int j = 10; int n = 0; while (i != j) { i = i + 2; j = j - 2; n++; }

i                 j                n

2                8               1

4                6               2

6                4               3

8                2               4

10              0                5

12             -2                6

14             -4                 7

...               ...                ...

...               ...               ...    

...              ...                ...

You might be interested in
Bob works at a cafe where he earns $11 an hr. which of the following graphs describes the amount of money that bob earns after x
Sergio039 [100]
Where are the graphs?
8 0
3 years ago
Read 2 more answers
18. Applying what formatting option to your Excel workbook will make it easier to read when printed out?
Sergeu [11.5K]
Depending on the data all answers can be used to make it easier to read. Without more info I would go with Borders (D) since they are the best way to group the data when printed, especially if the print is in color.

Alignment would be the correct answer only if the data goes out of cell boundaries. Font Color usually makes it harder to read because of bad contrast and finally changing the Font Style has a minimal effect since the default one is already pretty readable.
7 0
3 years ago
What type of hacker is primarily motivated by an ideology, epitomizing "the ends justify the means" mentality?.
Hunter-Best [27]

The type of hacker that is primarily moved by an ideology, epitomizing "the ends justify the means" mentality is Hacktivism.

<h3>What type of hackers are motivated by social or political issues?</h3>

Hacktivism is known to be an act of the wrong use a computer system or network for a socially or politically motivated  aim or reason.

The type of hacker that is primarily moved by an ideology, epitomizing "the ends justify the means" mentality is Hacktivism and they are called hacktivist.

Learn more about Hacktivism from

brainly.com/question/5483494

#SPJ1

5 0
2 years ago
Select the correct answer.
swat32
Answer : C project planning
5 0
3 years ago
Who is the best basketball player ever... if you do not say lebron do not comment
Andrews [41]

Kobe was the best basketball player R.I.P

6 0
3 years ago
Other questions:
  • 1.6.6 Night out for codehs
    6·1 answer
  • For a project called "The Sheep Market", Aaron Koblin collected drawings of sheep from strangers on the Internet. He posted the
    14·1 answer
  • _________ are represented using diamonds linked withparticipant ETs
    6·1 answer
  • A motherboard has four DIMM slots; three slots are gray and the fourth is black. What type of memory is this board designed to u
    6·1 answer
  • What port in your computer will you use to plug in your camera?
    14·2 answers
  • How many cells does the organism have?\
    5·2 answers
  • Write a complete Java program called Stewie2 that prints the following output. Use at least one static method besides main. ////
    9·2 answers
  • Many major employers routinely monitor the performance of their employees through the computers and telephones they use. Employe
    12·1 answer
  • What does good time management mean​
    8·2 answers
  • What is not recyclable in a<br> hybrid car<br> hydrogen car<br> petrol car
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!