This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
haas:spring2017:cprog:projects:sof0 [2017/01/24 16:06] – [Execution] wedge | haas:spring2017:cprog:projects:sof0 [2017/01/31 21:25] (current) – [Program] wedge | ||
---|---|---|---|
Line 15: | Line 15: | ||
The allure of using (and learning) a programming language is to be able to effectively use it to solve problems, which in and of themselves are simulations of some process we can do in "the real world" | The allure of using (and learning) a programming language is to be able to effectively use it to solve problems, which in and of themselves are simulations of some process we can do in "the real world" | ||
- | In this case, we will be writing a program which will implement the mental math techniques for computing the square of any two-digit number that ends with 5. | + | In this case, we will be writing a program which will implement the mental math techniques for computing the square of any one, two-, or three-digit number that ends with 5. |
=====Background===== | =====Background===== | ||
Line 118: | Line 118: | ||
* display the resulting number to STDOUT (right-justified in a space supporting the largest possible value -- see output example below) | * display the resulting number to STDOUT (right-justified in a space supporting the largest possible value -- see output example below) | ||
* display any supporting text to STDERR (display of source values left-justified in a space supporting 3-digit values -- see output example below). | * display any supporting text to STDERR (display of source values left-justified in a space supporting 3-digit values -- see output example below). | ||
+ | * because we have not officially learned how to do selection/ | ||
=====Execution===== | =====Execution===== | ||