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
As related to the use of computers, ____ is defined as gaining unauthorized access or obtaining confidential information by taki
solong [7]

Answer:

Option(B) i.e., social engineering  is the correct option to the question.

Explanation:

The following option is correct because social engineering is the type of attack in which the criminals tricks the computer users to disclose the confidential data or information. Criminals or hackers use this trick because by this they can easily take advantage of your confidential information or corporate secrets.

4 0
3 years ago
Construct a group frequency distribution for the following data: 18, 22, 15, 12, 18, 22, 22, 24, 21, 19, 13, 13, 17, 18, 20, 12,
Y_Kistochka [10]

Answer:

uhebcuwcih

Explanation:

iqic c .j .c h de c veo  dnjen jndc j .ececiibbec .cecinineijc    

4 0
3 years ago
Read 2 more answers
Which section is optional in a resume?
suter [353]

<em>Career Objectives </em>are pointless in a resume, Things like experience, Contact details, education and skills, help the company decide whether to take you or not, in accordance with their needs. They don't need to know why you want the job as opposed to how you could help them.

7 0
3 years ago
Which parts of the forebrain are sometimes described as the “executive center” and can be likened to the central processing unit
8_murik_8 [283]

I guess the correct answer is Frontal Lobes

Thе frοntal lοbе is thе part οf thе brain that cοntrοls impοrtant cοgnitivе skills in humans, such as еmοtiοnal еxprеssiοn, prοblеm sοlving, mеmοry, languagе, judgmеnt, and sеxual bеhaviοrs. It is, in еssеncе, thе “cοntrοl panеl” οf οur pеrsοnality and οur ability tο cοmmunicatе.

6 0
3 years ago
Which type of data is presented on the y-axis?
den301095 [7]
For example, if I was foong a bar graph about the amounts of what was in different jars, the x-axis would have the items in the jars, and the y-axis woukd have the amount of items in the jars
6 0
3 years ago
Read 2 more answers
Other questions:
  • A disk with many program and data files scattered on it is said to be ____.
    15·1 answer
  • What is html?
    9·2 answers
  • Sarah is working on a project in which she needs to record all the extracurricular activities in her college. Her college teache
    5·1 answer
  • Define function print_popcorn_time() with parameter bag_ounces. If bag_ounces is less than 3, print "Too small". If greater than
    15·1 answer
  • A school at which you are likely to be accepted because you meet graduation requirements is called a:
    5·1 answer
  • Once you resize a photograph, it cannot be returned to its original size. TRUE or FALSE
    8·1 answer
  • PLZ ANSWER THESE QUESTIONS FOR 30 POINTS AND BRAINLIEST!
    9·1 answer
  • Write a program that asks the user to enter a number of seconds. There are 60 seconds in a minute. If the number of seconds ente
    9·1 answer
  • Create a static method that: - is called appendPosSum - returns an ArrayList - takes one parameter: an ArrayList of Integers Thi
    6·1 answer
  • Type the correct answer in the box
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!