Getting code handed to you probably isn't the best way to learn but here you go. The code may have bugs so don't blame me if you get an F. (N.B. This code will say that zero is even.)

Code:

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(void){
int number;
int primeflag=1;
int i;
int temp;
printf("please enter a number: ");
scanf("%i", &number);
printf("you entered %d\n", number);
if(abs(number)!=number){
number=-number;
}
/*method one*/
if (number%2==0.0){
printf("the number is even\n");
} else {
for (i=3;i<number;i++){
if (number%i==0.0){
printf("the number is odd\n");
primeflag=0;
break;
}
}
if (primeflag==1){
printf("the number is prime\n");
}
}
/*method two: a bit fancier*/
if (number%2==0.0){
printf("the number is even\n");
} else {
temp = (int)ceil(sqrt(number));
for (i=3;i<=temp;i++){
if (number%i==0.0){
printf("the number is odd\n");
break;
}
}
if (i>temp){
printf("the number is prime\n");
}
}
return 0;
}