Given the following first two lines of the recursive step of the Towers of Hanoi problem, write the third line:

tower (fromTower, auxTower, toTower, n-1);
cout << “Move disk “ << n << “ from tower “ << fromTower << “ to tower “ << toTower << endl;


tower (auxTower, toTower, fromTower, n-1);

Computer Science & Information Technology

You might also like to view...

Assuming ptNum is a pointer, the statement ____ uses the pointer and then increments it.

a. *++ptNum b. *ptNum++ c. *ptNum-- d. *--ptNum

Computer Science & Information Technology

Using CONSTANTS will enforce the same spelling in all programs, enforce consistency, and make efficient use of server memory.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

When you insert a hyperlink, Outlook does not require the ____________________ portion of the address.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Which of the following is NOT true about a file system's directory?

A. it occupies the first few tracks on the disk B. it contains an entry for each file C. each file entry holds the address of the sector containing file data D. the directory is organized as a linear structure

Computer Science & Information Technology