Difference between revisions of "CSC231 Homework 6 2015"
Line 10: | Line 10: | ||
<br /> | <br /> | ||
<onlydft> | <onlydft> | ||
− | + | <br /> | |
− | + | =Problem #1= | |
+ | <br /> | ||
Same problem as we did in class. Below is the mystery program. Its output is listed in the header of the program. | Same problem as we did in class. Below is the mystery program. Its output is listed in the header of the program. | ||
− | < | + | ::<source lang="cpp"> |
/* mystery.cpp | /* mystery.cpp | ||
Line 49: | Line 50: | ||
} | } | ||
− | </ | + | </source> |
− | + | <br /> | |
What two positive numbers are stored in x and y to create the output listed in the header? | What two positive numbers are stored in x and y to create the output listed in the header? | ||
Explain your answer. | Explain your answer. | ||
− | + | <br /> | |
− | + | =Problem #2= | |
− | + | <br /> | |
Assume that we want to compute the [http://en.wikipedia.org/wiki/Fibonacci_number Fibonacci] series with a compiled program. | Assume that we want to compute the [http://en.wikipedia.org/wiki/Fibonacci_number Fibonacci] series with a compiled program. | ||
Line 68: | Line 69: | ||
Explain carefully how you derive your answers. Prefered answers are answers that contain a program (in the language of your choice) demonstrating/illustrating in one way or another the answers to the various questions. | Explain carefully how you derive your answers. Prefered answers are answers that contain a program (in the language of your choice) demonstrating/illustrating in one way or another the answers to the various questions. | ||
− | + | <br /> | |
==Problem #3== | ==Problem #3== | ||
− | + | <br /> | |