Question: (Please use C language, not C++) Determine the following information about each value in a list of positive integers. a. Is the value a multiple

(Please use C language, not C++) Determine the following information about each value in a list of positive integers.

a. Is the value a multiple of 7, 11, or 13?

b. Is the sum of the digits odd or even? (parameter output returns 0 for even, 1 for odd)

c. Is the value a prime number? (parameter output returns 0 nonprime, 1 for prime)

Use an output file for results. The goal is to implement both pass by value and pass by reference.

Typical Input could be: 104 3773 12 121 77 30751 -1

You main will look like this:

void main()

{

int value;

int multi, oddEven, prime;

getInput(&value);

while (value != -1)

{ multipleOf(value,&multi);

isOddEven(value, &oddEven);

isPrime(value, &prime)

printResults(value, multi, oddEven, prime);

getInput(&value);

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!