Assume variables first, second, and max are declared to be double and are initialized. Write a sequence of lines of code that cause the larger of the values in first and second to be stored in max.

What will be an ideal response?


```
//double first, second, max
//first and second have been initialized
if ( (first < second) )
max = second;
else
max = first;
//assert: max >= first && max >= second
```

Computer Science & Information Technology

You might also like to view...

Give code to assign the string "Wilbur's brother Orville" to the member item of the variable to which head points. Hint: you need a function declared in cstring.

``` const int STRING_SIZE = 20; struct ListNode { char item[STRING_SIZE]; int count; ListNode *link; }; ListNode *head = new ListNode; ```

Computer Science & Information Technology

Move semantics and forwarding functions in C++0x can be written using __________.

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

Computer Science & Information Technology

Loop modifiers are perfect for situations where you need to repeat the execution of multiple statements.

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

Computer Science & Information Technology

In datasheet view, what do the rows indicate?

A. Tables B. Fields C. Records D. Information

Computer Science & Information Technology