Consider the following algorithm that calculates greatest common divisor using the Euclidean algorithm:Algorithm gcd (a, b)Post greatest common divisor returned if (b equals 0) return a end if if (a equals 0) return b end if return gcd (b, a mod b)end gcdWhat should be its pre-condition?
A. a and b are positive integers greater than 0
B. a and b are positive integers, and a > b
C. a and b are positive integers, and a < b
D. a and b are integers
Answer: A
You might also like to view...
Generally speaking, how does the file size change if the total number of pixels of an image is doubled?
What will be an ideal response?
To use Remote Desktop, the computer you access remotely can be running Windows 8 Home Edition or Windows 8.1 Professional.
Answer the following statement true (T) or false (F)
PowerPoint provides three ________: Spelling, Research, and Thesaurus
Fill in the blank(s) with correct word
The purpose of the Widow/Orphan control and "Keep with next" paragraph setting is to prevent a heading and the paragraph that follows from becoming separated across two pages
Indicate whether the statement is true or false