void()//If you need any params to entered, declare the vars in the "()"
{
//Code here
}
//Void should be used if you don't need the function to return something.
//But if you need the function to return something, use like char, double, float or int and use the "return 10.1;" or for a char "return 'a';"
type function_name(parameters)
{
body of function
};
int check_answer(int answer)
{
if (answer == 5)
{
return 1;
}
else {return 0;}
};
mark = mark + check_answer(Five);
Users browsing this forum: No registered users and 1 guest