Excercise 04: Loops

When you clone this assignment you will see three C files in which you are to write programs. Each file contains a comment with instructions. Write your code below the comment in each file.

The file non_negative_integers.c is the easiest one, so start there.

Submission

When you are confident your programs work (test them with a few different values!) submit your work by adding, committing, and pushing your changes with git. You can add all three files on one line if you want, like this:

$ git add non_negative_integers.c factorial.c powers_of_two.c

You can also add them one at a time:

$ git add non_negative_integers.c
$ git add factorial.c
$ git add powers_of_two.c

Either way, you can then run commit and all of your changes will be committed.

Local Testing

You can run the testing locally using the following commands for each program respectively:

make gh-test-factorial
make gh-test-integers
make gh-test-powers

If you forget this, the Makefile has the names of each test command.

Submission

GitHub will test your code and you can see results of the tests from your GitHub repository link. If any of your programs do not pass the tests, you may make changes and submit again. To submit again, simply add the file(s) that you changed, commit, and push again.

For full credit all the tests must pass Your grade for this exercise will be out out of 10 points: