haas:fall2020:cprog:projects:cnv0
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
haas:fall2020:cprog:projects:cnv0 [2020/10/08 08:33] – [Submission] wedge | haas:fall2020:cprog:projects:cnv0 [2020/10/08 11:04] (current) – [Submission] wedge | ||
---|---|---|---|
Line 89: | Line 89: | ||
Because there are 3 factor pairs, 12 would be considered an nary(3) value (or a tertiary number). | Because there are 3 factor pairs, 12 would be considered an nary(3) value (or a tertiary number). | ||
+ | |||
+ | =====grabit===== | ||
+ | There is a grabit for this project, which will provide you with some files pertinent for performing this project. | ||
+ | |||
+ | Run ' | ||
+ | |||
+ | =====Compiling===== | ||
+ | Since there is a provided Makefile in the project grabit, we can use that to compile, either regularly: | ||
+ | |||
+ | <cli> | ||
+ | yourpi: | ||
+ | </ | ||
+ | |||
+ | Or, with debugging support: | ||
+ | |||
+ | <cli> | ||
+ | yourpi: | ||
+ | </ | ||
+ | |||
=====Program===== | =====Program===== | ||
It is your task to write a program that, upon accepting various pieces of input from the user, computes the number of factor pairs of a given number, displaying its eligibility as a secondary number. | It is your task to write a program that, upon accepting various pieces of input from the user, computes the number of factor pairs of a given number, displaying its eligibility as a secondary number. | ||
Line 114: | Line 133: | ||
====Secondary number output==== | ====Secondary number output==== | ||
<cli> | <cli> | ||
- | lab46:~/src/c4eng/cnv0$ ./cnv0 | + | yourpi:~/src/cprog/cnv0$ ./cnv0 |
Enter a number: 6 | Enter a number: 6 | ||
6 is a secondary number | 6 is a secondary number | ||
- | lab46:~/src/c4eng/ | + | yourpi:~/src/cprog/ |
</ | </ | ||
====Non-secondary number output==== | ====Non-secondary number output==== | ||
<cli> | <cli> | ||
- | lab46:~/src/c4eng/cnv0$ ./cnv0 | + | yourpi:~/src/cprog/cnv0$ ./cnv0 |
Enter a number: 7 | Enter a number: 7 | ||
7 is NOT a secondary number | 7 is NOT a secondary number | ||
Line 129: | Line 148: | ||
====Additional outputs==== | ====Additional outputs==== | ||
<cli> | <cli> | ||
- | lab46:~/src/c4eng/cnv0$ ./cnv0 | + | yourpi:~/src/cprog/cnv0$ ./cnv0 |
Enter a number: 8 | Enter a number: 8 | ||
8 is a secondary number | 8 is a secondary number | ||
- | lab46:~/src/c4eng/cnv0$ ./cnv0 | + | yourpi:~/src/cprog/cnv0$ ./cnv0 |
Enter a number: 16 | Enter a number: 16 | ||
16 is NOT a secondary number | 16 is NOT a secondary number | ||
- | lab46:~/src/c4eng/cnv0$ ./cnv0 | + | yourpi:~/src/cprog/cnv0$ ./cnv0 |
Enter a number: 21 | Enter a number: 21 | ||
21 is a secondary number | 21 is a secondary number | ||
- | lab46:~/src/c4eng/ | + | yourpi:~/src/cprog/ |
</ | </ | ||
The execution of the program is short and simple- obtain the input, do the processing, produce the output, and then terminate. | The execution of the program is short and simple- obtain the input, do the processing, produce the output, and then terminate. | ||
- | |||
- | =====grabit===== | ||
- | There is a grabit for this project, which will provide you with some files pertinent for performing this project. | ||
- | |||
- | Run ' | ||
- | |||
- | =====Compiling===== | ||
- | Since there is a provided Makefile in the project grabit, we can use that to compile, either regularly: | ||
- | |||
- | <cli> | ||
- | lab46: | ||
- | </ | ||
- | |||
- | Or, with debugging support: | ||
- | |||
- | <cli> | ||
- | lab46: | ||
- | </ | ||
=====Reference===== | =====Reference===== | ||
Line 175: | Line 176: | ||
<cli> | <cli> | ||
- | lab46: | + | yourpi: |
[ 1] you have: err, should be: err [ 2] you have: no, should be: no | [ 1] you have: err, should be: err [ 2] you have: no, should be: no | ||
[ 3] you have: no, should be: no [ 4] you have: yes, should be: yes | [ 3] you have: no, should be: no [ 4] you have: yes, should be: yes | ||
Line 194: | Line 195: | ||
[ 33] you have: yes, should be: yes [ 34] you have: yes, should be: yes | [ 33] you have: yes, should be: yes [ 34] you have: yes, should be: yes | ||
[ 35] you have: yes, should be: yes [ 36] you have: no, should be: no | [ 35] you have: yes, should be: yes [ 36] you have: no, should be: no | ||
- | lab46: | + | yourpi: |
</ | </ | ||
+ | |||
=====Submission===== | =====Submission===== | ||
To successfully complete this project, the following criteria must be met: | To successfully complete this project, the following criteria must be met: |
haas/fall2020/cprog/projects/cnv0.1602160424.txt.gz · Last modified: 2020/10/08 08:33 by wedge