diff --git a/Midterm/build/Release/outRelease b/Midterm/build/Release/outRelease new file mode 100755 index 0000000..7ff6f29 Binary files /dev/null and b/Midterm/build/Release/outRelease differ diff --git a/Midterm/midterm.c b/Midterm/midterm.c new file mode 100644 index 0000000..508b228 --- /dev/null +++ b/Midterm/midterm.c @@ -0,0 +1,40 @@ +// header files +#include +#include +#include +#include + +// local constants + +/* +Name: Multiples Printer +Process: Given a start, stop, step, print all numbers between the values of + start and stop by step. +Function input/parameters: NONE +Function output/parameters: NONE +Function output/returned: NONE +Device input/---: NONE +Device output/---: NONE +Dependencies: included by standard libraries +*/ +int main() +{ + // define local variables + int start = 10, stop = 30, step = 4, currentNumber; + // do calculations + currentNumber = start; + while(currentNumber < stop) + { + // print out the multiple if % returns 0 + if(currentNumber % step == 0) + { + printf("%d\n", currentNumber); + } + // update the currentNumber + currentNumber = currentNumber + 1; + } + // display results + // done in do calculations + // return success + return 0; +} \ No newline at end of file