vendredi 12 avril 2019

Can any one explain this question because I don't understand it?

I want to write a C function called CalculateOddEven, which takes a pointer to an integer number a and actual integers b and c, the function should return an integer. The function should generate a random number between b and c, and then export the closest even number (either the number itself or the previous number), while returning the closest positive number (either the number itself or the next number).

For completeness you must seed the random number generator in your function.

Your algorithm must NOT use modulo, if statements, case statements, ternary operators, or any other form of selection control.




Aucun commentaire:

Enregistrer un commentaire