This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
haas:spring2017:sysprog:projects:sci0 [2017/01/26 16:51] – [Background] wedge | haas:spring2017:sysprog:projects:sci0 [2017/02/14 17:00] (current) – [Submission] wedge | ||
---|---|---|---|
Line 99: | Line 99: | ||
* the file(s) | * the file(s) | ||
* perform the task (process) | * perform the task (process) | ||
- | * isolate one's digit mathematically, store in a variable (unsigned short int) | + | * as stated, you are not allowed to use any of the **strtol(3)** family |
- | | + | * This isn't to say you cannot use them; you may, you just cannot use them to do any of the conversion work (beyond ASCII to base 10). |
- | | + | * display |
- | * display | + | * if error or usage, make sure you return |
- | * display | + | |
- | * display the resulting number | + | |
- | * display | + | |
- | * because we have not officially learned how to do selection/ | + | |
=====FAQs/ | =====FAQs/ | ||
Line 236: | Line 232: | ||
lab46: | lab46: | ||
</ | </ | ||
- | =====Verification===== | ||
- | One of the tests I will perform for output compliance of your code will involve comparing your program' | ||
- | I will make use of a checksum to verify exactness. | ||
- | You will need to run this from your sof0 project directory with a compiled and operational binary by the name of **sof0**. | ||
- | |||
- | You can check your project by typing in the following at the prompt: | ||
- | |||
- | <cli> | ||
- | lab46: | ||
- | </ | ||
- | |||
- | If all aligns, you will see this: | ||
- | |||
- | <cli> | ||
- | ================================================== | ||
- | = CPROG sof0 project output validation tool = | ||
- | ================================================== | ||
- | sof0 checksum is: 822a47fb2a45845500b6c10878045bd5 | ||
- | your checksum is: 822a47fb2a45845500b6c10878045bd5 | ||
- | ================================================== | ||
- | verification: | ||
- | ================================================== | ||
- | </ | ||
- | |||
- | If something is off, your checksum will not match the sof0 checksum, and verification will instead say " | ||
- | |||
- | <cli> | ||
- | ================================================== | ||
- | = CPROG sof0 project output validation tool = | ||
- | ================================================== | ||
- | sof0 checksum is: 822a47fb2a45845500b6c10878045bd5 | ||
- | your checksum is: 92af264c86823a61529948caaeac53e0 | ||
- | ================================================== | ||
- | verification: | ||
- | ================================================== | ||
- | </ | ||
- | =====Questions / Food for Thought===== | ||
- | These are things I'd like you to contemplate, | ||
- | |||
- | * Why/how does this trick work for 1-digit numbers? | ||
- | * Considering our 1-, 2-, and 3-digit domain restriction for this project, how many candidate values are there for input? | ||
- | * What is the smallest input value? | ||
- | * What is the largest input value? | ||
- | * How many input values are there that end in **5**? | ||
- | * What is the largest square that can be calculated given the project input restrictions? | ||
- | * How many digits is the largest square? | ||
- | * How can knowing how many digits the largest square is help you implement your solution? | ||
=====Submission===== | =====Submission===== | ||
- | To successfully complete this project, the following criteria must be met: | ||
- | |||
- | * Code must compile cleanly (no warnings or errors) | ||
- | * Executed program must display a total of 2 lines, one for input, one for output. | ||
- | * The computed number must be output to STDOUT | ||
- | * Any supporting output must be output to STDERR | ||
- | * Output is formatted in the manner in the sample above | ||
- | * Output must be correct, and match the form given in the sample output above. | ||
- | * Code must be nicely and consistently indented | ||
- | * Code must implement solution using the mental math technique described above | ||
- | * Code must be commented | ||
- | * have a properly filled-out comment banner at the top | ||
- | * have at least 20% of your program consist of **< | ||
- | * Output Formatting (including spacing) of program must conform to the provided output (see above). | ||
- | * Track/ | ||
- | * 25% late penalty per day after deadline | ||
- | * Program is submit in a C source file called **sof0.c** and compiles without warning, note, nor error with gcc on lab46. | ||
- | * Submit a copy of your source code to me using the **submit** tool. | ||
To submit this program to me using the **submit** tool, run the following command at your lab46 prompt: | To submit this program to me using the **submit** tool, run the following command at your lab46 prompt: | ||
<cli> | <cli> | ||
- | $ submit | + | $ submit |
- | Submitting | + | Submitting |
- | -> sof0.c(OK) | + | -> mychmod.c(OK) |
SUCCESSFULLY SUBMITTED | SUCCESSFULLY SUBMITTED | ||
Line 317: | Line 248: | ||
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. | ||
- | I'll be looking for the following: | ||
- | |||
- | < | ||
- | 52: | ||
- | *: | ||
- | *:sof0:data stored and calculated in correct and separate variables [4/4] | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *: | ||
- | *:sof0:no negative compiler messages for sof0.c [4/4] | ||
- | </ |