You must time the test yourself and ensure you comply with the conditions below.
You may assume that the program's input will contain only positive integers and will contain at least 10 integers, in other words you can assume scanf succeeds.
Match the the example below EXACTLY.
dcc odd_even_ten.c -o odd_even_ten ./odd_even_ten 3 4 5 6 7 9 8 7 6 5 Odd numbers were: 3 5 7 9 7 5 Even numbers were: 4 6 8 6 ./odd_even_ten 1 2 4 16 32 64 128 256 512 1024 Odd numbers were: 1 Even numbers were: 2 4 16 32 64 128 256 512 1024 ./odd_even_ten 3 5 7 11 13 11 9 7 5 3 Odd numbers were: 3 5 7 11 13 11 9 7 5 3 Even numbers were:
When you think your program is working you can autotest
to run some simple automated tests:
1511 autotest odd_even_ten
give cs1511 test06_odd_even_ten odd_even_ten.c
You may assume that the program's input will contain only integers, in other words you can assume scanf succeeds.
You can assume a negative integer will always be read.
You can assume at most 1000 integers are read before a negative integer is read.
Match the the example below EXACTLY.
./odd_even_negative 1 2 3 2 -42 Odd numbers were: 1 3 Even numbers were: 2 2 ./odd_even_negative 1 2 4 16 32 64 128 256 512 1024 2048 4096 -8192 Odd numbers were: 1 Even numbers were: 2 4 16 32 64 128 256 512 1024 2048 4096Hint: use odd_even_ten.c as a starting point.
When you think your program is working you can autotest
to run some simple automated tests:
1511 autotest odd_even_negative
give cs1511 test06_odd_even_negative odd_even_negative.c
It should then print the integers read which are not exactly divisible by any other of the integers read.
In other words it should not print an integer if another integer that has been read is a factor of that number.
You may assume that the program's input will contain only positive integers one per line.
You may assume that all integers are > 1.
You can assume at most 1000 integers will be read before end-of-input is reached.
Match the the example below EXACTLY.
./indivisible 42 7 6 12 Indivisible numbers: 7 6 ./indivisible 2 3 4 5 6 7 8 9 10 Indivisible numbers: 2 3 5 7 ./indivisible 5 6 5 Indivisible numbers: 6 ./indivisible 4 7 4 Indivisible numbers: 7
When you think your program is working you can autotest
to run some simple automated tests:
1511 autotest indivisible
give cs1511 test06_indivisible indivisible.c
You can run give multiple times. Only your last submission will be marked.
Don't submit any exercises you haven't attempted.
If you are working at home, you may find it more convenient to upload your work via give's web interface.
Remember you have until Wednesday 18 April 23:59:59 to complete this test.
Automarking will be run several days after the submission deadline for the test. When complete you can view automarking here and you can view the the resulting mark via give's web interface