I am not sure why I am getting the 'else without an if' error. My format is correct according to the book.
if(donationType>2)
{
if(donationType == CLOTHING_CODE)
{
volunteer = CLOTHING_PRICER;
message = "a clothing donation";
}
else
{
volunteer = OTHER_PRICER;
message = "a non-clothing donation";
}
else`enter code here`
message = "This is an invalid donation type";
message = "The volunteer who will price this item is invalid";
}
Aucun commentaire:
Enregistrer un commentaire