User Tools

Site Tools


haas:fall2019:c4eng:projects:fwf0

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:fall2019:c4eng:projects:fwf0 [2019/10/28 12:21] – [Intermediate] wedgehaas:fall2019:c4eng:projects:fwf0 [2019/10/28 13:09] (current) – [Grabbing project resources] wedge
Line 23: Line 23:
 If there is some fictional country, other state/county/canton, or organization symbol you would like to implement instead, you are welcome to (so long as they conform to the difficulty levels specified below). If there is some fictional country, other state/county/canton, or organization symbol you would like to implement instead, you are welcome to (so long as they conform to the difficulty levels specified below).
  
-You are tasked with creating two different flags (this can be in the same program, or in the form of two separate programs, your choice), of differing levels of complexity. Namely, one "intermediate" flag, and one "medium" flag.+You are tasked with creating two different flags (from one program), of differing levels of complexity. Namely, one "intermediate" flag, and one "medium" flag.
  
 Difficulties are defined as follows: Difficulties are defined as follows:
Line 51: Line 51:
  
 =====Program===== =====Program=====
-It is your task to write a program that, upon accepting various pieces of input from the usercomputes the number of factor pairs of given number or range of numbersdisplaying to STDOUT all the numbers in that range that qualify as secondary number.+It is your task to write a program that generate a total of two different flag imageshosted under your lab46 webspace under **fwf0/** directorynamed and accessible as follows: 
 + 
 +  * fwf0/flag1.png 
 +  * fwf0/flag2.png 
 + 
 +flag1 is to be in intermediate (or greater) level flag, and flag2 is to be medium (or greater) level flag. 
 + 
 +Opting to do higher difficulties may earn you some bonus points.
  
 =====Specifications===== =====Specifications=====
Line 60: Line 67:
     * all code within the same scope aligned to its indentation level     * all code within the same scope aligned to its indentation level
   * have proximal comments explaining your rationale and what is going on, throughout your code   * have proximal comments explaining your rationale and what is going on, throughout your code
-  * to STDERR, prompt for the number (range appropriate of an unsigned long int) +  * perform the intended operationoutputting the correct/accurate information in indicated format 
-    * properly store this in a variable of type **unsigned long int** +  * at the end of your main() functionuse a single return statement to conclude your code, return a 0 indicating successful operation
-  * immediately after the inputcheck to make sure the input number is a positive number greater than or equal to 2; if in violation, display an error (to STDERR) and exit with a non-zero value. +
-  * proceed to evaluate the appropriate number range, determining whether or not it is a secondary (nary(2)) number. +
-    * if it isdisplay the value to STDOUT in space-separated form (see execution section below for message) +
-    * if it is not, do not display anything related to that value (again, see execution section below) +
-  * using a single return statement at the conclusion of the code, return a 0 indicating successful operation+
  
 Some additional points of consideration: Some additional points of consideration:
   * Note that the driving variables in your loops need to be at least of type **short int**, otherwise you may get a warning when you compile it.   * Note that the driving variables in your loops need to be at least of type **short int**, otherwise you may get a warning when you compile it.
  
-=====Execution=====+=====Grabbing project resources===== 
 +I have prepared a **grabit** for resources related to this project. To obtain:
  
-====Secondary number output==== 
 <cli> <cli>
-lab46:~/src/c4eng/cnv1./cnv1 +lab46:~/src/c4eng$ grabit c4eng fwf0 
-Enter a lower bound3 +makeEntering directory '/var/public/fall2019/c4eng/fwf0' 
-Enter an upper bound: 12 +'/var/public/fall2019/c4eng/fwf0/Makefile' -> '/home/wedge/src/c4eng/fwf0/Makefile' 
-4 6 8 9 10 +'/var/public/fall2019/c4eng/fwf0/fwf0.c' -> '/home/wedge/src/c4eng/fwf0/fwf0.c' 
-lab46:~/src/c4eng/cnv1+make: Leaving directory '/var/public/fall2019/c4eng/fwf0' 
 +lab46:~/src/c4eng$ 
 </cli> </cli>
  
-The execution of the program is short and simple- obtain the input, do the processing, produce the output, and then terminate. +At which point you can change into the newly created and populated **fwf0** directory.
 =====Compiling===== =====Compiling=====
-As we have been doing all along, use the following options to gcc when compiling:+Since the grabit brought in a Makefile, you can compile your code simply by typing**make**
  
-<cli> +Any compiler errors will go into a text file called **errors**
-lab46:~/src/c4eng/cnv1$ gcc -Wall --std=gnu99 -o cnv1 cnv1.c +
-lab46:~/src/c4eng/cnv1$  +
-</cli>+
  
-=====Reference===== +To do a full cleaningrun: **make clean** then **make** (or **make debug**)
-In the C4ENG public directoryinside the **cnv1** subdirectory, will be a copy of my implementation (in executable form, by the name **ref_cnv1**), which abides by the project specifications. Please compare its output against that of your implementation.+
  
-<cli> +If you'd like to see compiler messages as you compile, run**make debug**
-lab46:~/src/c4eng/cnv1$ /var/public/fall2019/c4eng/cnv1/ref_cnv1 +
-Enter a lower bound: 2 +
-Enter an upper bound: 40 +
-4 6 8 9 10 14 15 21 22 25 26 27 33 34 35 38 39 +
-lab46:~/src/c4eng/cnv1$  +
-</cli>+
  
-=====Verification===== +When done and ready to submiton lab46: **make submit**
-In additionI have also placed a **cnv1verify** script in that same subdirectory, which will test your program against a range of values, to determine overall correctness.+
  
-<cli> 
-lab46:~/src/c4eng/cnv1$ /var/public/fall2019/c4eng/cnv1/cnv1verify 
-[  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 
-[  5] you have:  no, should be:  no    [  6] you have: yes, should be: yes 
-[  7] you have:  no, should be:  no    [  8] you have: yes, should be: yes 
-[  9] you have: yes, should be: yes    [ 10] you have: yes, should be: yes 
-[ 11] you have:  no, should be:  no    [ 12] you have:  no, should be:  no 
-[ 13] you have:  no, should be:  no    [ 14] you have: yes, should be: yes 
-[ 15] you have: yes, should be: yes    [ 16] you have:  no, should be:  no 
-[ 17] you have:  no, should be:  no    [ 18] you have:  no, should be:  no 
-[ 19] you have:  no, should be:  no    [ 20] you have:  no, should be:  no 
-[ 21] you have: yes, should be: yes    [ 22] you have: yes, should be: yes 
-[ 23] you have:  no, should be:  no    [ 24] you have:  no, should be:  no 
-[ 25] you have: yes, should be: yes    [ 26] you have: yes, should be: yes 
-[ 27] you have: yes, should be: yes    [ 28] you have:  no, should be:  no 
-[ 29] you have:  no, should be:  no    [ 30] you have:  no, should be:  no 
-[ 31] you have:  no, should be:  no    [ 32] you have:  no, should be:  no 
-[ 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 
-lab46:~/src/c4eng/cnv1$  
-</cli> 
 =====Submission===== =====Submission=====
 To successfully complete this project, the following criteria must be met: To successfully complete this project, the following criteria must be met:
Line 143: Line 112:
  
 <cli> <cli>
-$ submit c4eng cnv1 cnv1.c +$ submit c4eng fwf0 fwf0.c 
-Submitting c4eng project "cnv1": +Submitting c4eng project "fwf0": 
-    -> cnv1.c(OK)+    -> fwf0.c(OK)
  
 SUCCESSFULLY SUBMITTED SUCCESSFULLY SUBMITTED
Line 155: Line 124:
  
 <code> <code>
-78:cnv1:final tally of results (78/78) +78:fwf0:final tally of results (78/78) 
-*:cnv1:proper error checking and status reporting performed [13/13] +*:fwf0:proper error checking and status reporting performed [13/13] 
-*:cnv1:correct variable types and name lengths used [13/13] +*:fwf0:correct variable types and name lengths used [13/13] 
-*:cnv1:proper output formatting per specifications [13/13] +*:fwf0:proper output formatting per specifications, flag 1 [13/13] 
-*:cnv1:runtime tests of submitted program succeed [13/13] +*:fwf0:proper output formatting per specifications, flag 2 [13/13] 
-*:cnv1:no negative compiler messages for program [13/13] +*:fwf0:no negative compiler messages for program [13/13] 
-*:cnv1:code is pushed to lab46 repository [13/13]+*:fwf0:code is pushed to lab46 repository [13/13]
 </code> </code>
  
haas/fall2019/c4eng/projects/fwf0.1572265279.txt.gz · Last modified: 2019/10/28 12:21 by wedge