subject

The following two algorithms are designed to find the number of integers on a list which have a value greater than 5. Algorithm I: Create a variable count and set this to zero. For each value on the list, check whether it is greater than 5. If it is, then add 1 to the value of count. When the end of the list is reached display the value of count.
Algorithm II: Create a variable count and set this to the number of items on the list. For each value on the list, check whether it is smaller than 5. If it is, then subtract 1 from the value of count. When the end of the list is reached display the value of count.
Which of the following statements correctly demonstrates that the two algorithms are NOT equivalent?

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 12:00, xojade
Which of these is an example of an integrated presentation? a. a table created in powerpoint b. an image pasted into powerpoint c. a caption created in powerpoint d. an excel chart pasted into powerpoint
Answers: 1
image
Computers and Technology, 23.06.2019 20:40, bobby3350
On nba 2k 19, every time i try to join a my park game, it leads ro a website telling my dad that he needs ps plus. i already have ps plus though. how do i fix this?
Answers: 2
image
Computers and Technology, 23.06.2019 21:30, shadoris26
To move a file or folder in microsoft windows, you can click and hold down the left mouse button while moving your mouse pointer to the location you want the file or folder to be, which is also known as.
Answers: 3
image
Computers and Technology, 24.06.2019 12:50, vianca15
What percentage of teens plays video games? a.97% b.100% c.74% d.50%
Answers: 1
You know the right answer?
The following two algorithms are designed to find the number of integers on a list which have a valu...

Questions in other subjects:

Konu
Computers and Technology, 27.06.2019 09:20