User Tools

Site Tools


haas:spring2014:cprog:projects:squares

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
haas:spring2014:cprog:projects:squares [2014/01/17 07:44] – [Prerequisites] wedgehaas:spring2014:cprog:projects:squares [2014/02/06 17:23] (current) – [Submission] wedge
Line 1: Line 1:
 +<WRAP centeralign round box>
 +<WRAP><color red><fs 200%>Corning Community College</fs></color></WRAP>
 +<WRAP><fs 150%>CSCS1320 C/C++ Programming</fs></WRAP>
 +</WRAP>
 +
 +~~TOC~~
 +
 ======Project: MENTAL MATH (SQUARES OF 5)====== ======Project: MENTAL MATH (SQUARES OF 5)======
  
-A project for C/C++ Programming.+
 =====Objective===== =====Objective=====
 To implement a programmatic solution (ie simulation) of a real life process- the mental math trick of computing the square of any two-digit number ending with 5. To implement a programmatic solution (ie simulation) of a real life process- the mental math trick of computing the square of any two-digit number ending with 5.
Line 16: Line 23:
  
 =====Background===== =====Background=====
-Mental Math constitutes an intersection of mental tricks and math- instead of utilizing a purely math-only solution, textual manipulations or simplifications in the computational process may take place enabling an individual to, once having learned the process, solve such problems in their head, and typically without the use of a calculating device.+Mental Math constitutes an intersection of mental techniques and math- instead of utilizing a purely math-only solution, textual manipulations or simplifications in the computational process may take place enabling an individual to, once having learned the process, solve such problems in their head, and typically without the use of a calculating device.
  
-The process in this case is one of string manipulation and simple (reduced) multiplication. To wit:+The process in this case is one of numeric manipulation and simple (reduced) multiplication. To wit:
  
 ====Squaring a value==== ====Squaring a value====
Line 26: Line 33:
   * 8 squared (8<nowiki>^</nowiki>2) is 8*8 or 64   * 8 squared (8<nowiki>^</nowiki>2) is 8*8 or 64
  
-While not outwardly a difficult procedure, the nature of multiplying multiple digit numbers in your head can quickly result in more steps (and more steps means more time).+While not outwardly a difficult procedure, the nature of multiplying multiple digit numbers in your head can quickly result in more steps (and more steps means more time, if doing things the traditional way).
  
 Finding a shortcut through this process enables it to remain solidly within the realm of mental math, and makes for a good algorithm to practice implementing on the computer. Finding a shortcut through this process enables it to remain solidly within the realm of mental math, and makes for a good algorithm to practice implementing on the computer.
Line 110: Line 117:
   * Output must be correct, and match the form given in the sample output above.   * Output must be correct, and match the form given in the sample output above.
   * Code must be nicely and consistently indented (you may use the **indent** tool)   * Code must be nicely and consistently indented (you may use the **indent** tool)
 +  * Code must implement solution using the mental math technique described above
   * Code must be commented   * Code must be commented
     * have a properly filled-out comment banner at the top     * have a properly filled-out comment banner at the top
Line 129: Line 137:
 You should get some sort of confirmation indicating successful submission if all went according to plan. If not, check for typos and or locational mismatches. You should get some sort of confirmation indicating successful submission if all went according to plan. If not, check for typos and or locational mismatches.
  
-====Verify submission==== 
-To verify you submitted successfully, you may run the following (from anywhere on lab46): 
- 
-<cli> 
-lab46:~$ verify cprog squares 
-squares: submitted successfully 
-</cli> 
  
-Note if automated assessment is available for the project, you may actually see results in the output as well. 
haas/spring2014/cprog/projects/squares.1389944691.txt.gz · Last modified: 2014/01/17 07:44 by wedge