Question: Odd-Even Negative Write a C program odd_even_ negative.c which reads integers from standard input until it reads a negative integer. It should then print the

Odd-Even Negative Write a C program odd_even_ negative.c which reads integers from standard input until it reads a negative integer. It should then print the odd numbers on one line then print the even numbers on one line You may assume that the program's input will contain only integers, in other words you can assume scanf succeeeds 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 2 2 -42 Odd numbers were: 1 3 Even numbers were: 2 2 ? ./odd_even_negative 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 4096 Hint: 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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
