This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
haas:spring2021:cprog:projects:sof0 [2020/08/31 22:12] – external edit 127.0.0.1 | haas:spring2021:cprog:projects:sof0 [2021/03/01 14:12] (current) – [Submission] wedge | ||
---|---|---|---|
Line 117: | Line 117: | ||
* 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/ | * because we have not officially learned how to do selection/ | ||
+ | |||
=====Execution===== | =====Execution===== | ||
<cli> | <cli> | ||
- | lab46: | + | yourpi:~/src/SEMESTER/ |
Enter value: 75 | Enter value: 75 | ||
75 x 75 = 5625 | 75 x 75 = 5625 | ||
- | lab46: | + | yourpi:~/src/SEMESTER/ |
</ | </ | ||
Line 133: | Line 134: | ||
<cli> | <cli> | ||
- | lab46: | + | yourpi:~/src/SEMESTER/ |
Enter value: 105 | Enter value: 105 | ||
105 x 105 = 11025 | 105 x 105 = 11025 | ||
- | lab46: | + | yourpi:~/src/SEMESTER/ |
</ | </ | ||
Line 144: | Line 145: | ||
<cli> | <cli> | ||
- | lab46: | + | yourpi:~/src/SEMESTER/ |
11025 | 11025 | ||
- | lab46: | + | yourpi:~/src/SEMESTER/ |
</ | </ | ||
Line 157: | Line 158: | ||
<cli> | <cli> | ||
- | lab46: | + | yourpi:~/src/SEMESTER/ |
Enter value: 75 | Enter value: 75 | ||
- | 75 x 75 = lab46: | + | 75 x 75 = yourpi:~/src/SEMESTER/ |
</ | </ | ||
Line 176: | Line 177: | ||
<cli> | <cli> | ||
- | lab46: | + | lab46:~/src/SEMESTER/ |
</ | </ | ||
Line 215: | Line 216: | ||
* How many digits is the largest square? | * How many digits is the largest square? | ||
* How can knowing how many digits the largest square is help you implement your solution? | * How can knowing how many digits the largest square is help you implement your solution? | ||
+ | |||
=====Review of Compiling/ | =====Review of Compiling/ | ||
- | Just to review the compilation/ | + | Just to review the compilation/ |
+ | |||
+ | If compiling on lab46: | ||
<cli> | <cli> | ||
- | lab46: | + | lab46:~/src/SEMESTER/cprog/PROJECT$ gcc -Wall --std=gnu99 |
- | lab46: | + | lab46:~/src/ |
+ | </ | ||
+ | |||
+ | If compiling on your pi system: | ||
+ | |||
+ | < | ||
+ | yourpi: | ||
+ | yourpi: | ||
</ | </ | ||
Line 228: | Line 239: | ||
< | < | ||
- | gcc -Wall --std=gnu99 -o BINARY_FILE SOURCE_FILE | + | gcc -Wall --std=gnu99 |
</ | </ | ||
The BINARY_FILE comes **immediately after** the **-o**, **NOT** the SOURCE_FILE (the source file must never **immediately** follow a **-o**). It can precede, and such is perfectly valid (especially if you feel that way more intuitive). | The BINARY_FILE comes **immediately after** the **-o**, **NOT** the SOURCE_FILE (the source file must never **immediately** follow a **-o**). It can precede, and such is perfectly valid (especially if you feel that way more intuitive). | ||
- | The **-Wall** (treat all warnings as errors, increase general verbosity about warnings) and **< | + | The **-Wall** (treat all warnings as errors, increase general verbosity about warnings) and **< |
+ | |||
+ | To execute your binary, we need to specify a path to it, so we use **./**, which basically references the current directory. | ||
+ | |||
+ | On lab46: | ||
+ | |||
+ | < | ||
+ | lab46: | ||
+ | </ | ||
- | To execute | + | On your pi system: |
<cli> | <cli> | ||
- | lab46: | + | yourpi:~/src/SEMESTER/cprog/PROJECT$ ./PROJECT.armv7l |
- | Hello, World! | + | |
- | lab46: | + | |
</ | </ | ||
Line 267: | Line 284: | ||
<cli> | <cli> | ||
- | lab46: | + | lab46:~/src/SEMESTER/ |
Submitting cprog project " | Submitting cprog project " | ||
-> sof0.c(OK) | -> sof0.c(OK) | ||
Line 280: | Line 297: | ||
< | < | ||
39: | 39: | ||
- | *:sof0:adequate indentation and comments in sof0.c | + | *:sof0:obtained via grabit by Sunday before deadline |
- | *:sof0:data stored and calculated in correct and separate variables | + | *:sof0:program compiles successfully, |
- | *:sof0:effective usage of fprintf() and fscanf() | + | *:sof0:program compiles with no warnings |
- | *: | + | *: |
- | *: | + | *:sof0:program |
- | *:sof0:runtime tests of sof0.c succeed | + | *:sof0:proper error checking and status reporting performed |
- | *:sof0:no negative compiler messages for sof0.c | + | *:sof0:code implements solution using relevant concepts |
- | *: | + | *:sof0:code updates committed/pushed to lab46 semester repo [3/3] |
+ | *:sof0:code uses correct variable types and name lengths [3/3] | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
</ | </ | ||
+ | |||
+ | Additionally: | ||
+ | * Solutions not abiding by **SPIRIT** of project will be subject to a 25% overall deduction | ||
+ | * Solutions not utilizing descriptive why and how **COMMENTS** will be subject to a 25% overall deduction | ||
+ | * Solutions not utilizing **INDENTATION** to promote scope and clarity will be subject to a 25% overall deduction | ||
+ | * Solutions lacking **ORGANIZATION** and are not easy to read (within 90 char width) are subject to a 25% overall deduction |