You should post your warnings and error messages. Also, make sure you're compiling with warnings turned up. This is what I got.
Code:
/*
main.c|3|warning: return type defaults to 'int'|
main.c||In function 'main':|
main.c|7|warning: implicit declaration of function 'max'|
main.c|8|error: expected ')' before ';' token|
main.c|12|warning: missing terminating " character|
main.c|12|error: missing terminating " character|
main.c|14|error: expected declaration or statement at end of input|
main.c|4|warning: unused variable 'black'|
main.c|4|warning: unused variable 'yellow'|
main.c|4|warning: unused variable 'magneta'|
||=== Build finished: 3 errors, 6 warnings ===|
*/
>> main.c|3|warning: return type defaults to 'int'|
This is saying "main()" should be defined as returning an int; i.e. "int main(void)"
>> main.c|7|warning: implicit declaration of function 'max'|
This is saying there is no function called "max", because the code on that line has syntax that implies you are calling a function named "max". I suspect you just blindly copied that from the assignment description, without realizing what it means.
>> main.c|8|error: expected ')' before ';' token|
This plainly says you're missing a ')' in the "cyan" formula. In fact, I recommend you count all of your opening and closing parenthesis on each line to make sure they're all there.
>> main.c|12|warning: missing terminating " character|
>> main.c|12|error: missing terminating " character|
This plainly says you're missing a closing " character in your "printf()" statement. Look at it, you need to end the string after the last '\n'.
>> ...
Those last few warnings are the result of earlier warnings/errors, so fixing those should get rid of them. I suspect there will still be problems for you to fix.
Code:
white=max((red/255),(green/255),(blue/255));
While the assignment was kind enough to write most of the formulas out in a way that you could just copy/paste into your program, they are not all way. Think carefully about the line of code above.