Hi guys, I have 2 quick questions on C.
If I have a function, thisfunction (), if i want to apply multiple numbers into it, like 37, 0, 100, etc. how would i go about doing that? I'm really stumped. So I want it to be like this:
Code:
//Prototype
void printEvenOrOdd (int 37, int 0, int 3, int 777, int 10000);
int main()
{
//Name:
printf("YOO HOO\n");
printf("Lab Exercise #10\n");
printf("Code::Blocks\n");
printf("\n");
//Statements:
printEvenOrOdd(37);
printEvenOrOdd(0);
printEvenOrOdd(3);
printEvenOrOdd(777);
printEvenOrOdd(10000);
return 0;
}
void printEvenOrOdd(int 37, int 0, int 3, int 777, int 10000)
{
//Not Finished yet!
}
Am I using the prototype right? I'm stumped.
My other question is one where I'm looking on printing the word even if its even, or odd if its odd. I'm not looking for any spoon fed answers, maybe a link to a page on how its done, or hints on it, but I've been looking in our textbook and no luck. My brain is frying over the frustration an easy problem is making. :/
Thanks guys, you are awesome