Computers and Technology, 13.01.2021 18:20 aaronk1120
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?
Answers: 3
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
The following two algorithms are designed to find the number of integers on a list which have a valu...
Computers and Technology, 27.06.2019 09:20