the above will work, but if I mix variables the compiler will complain.
eg:
float DailyWorkout(float hours, int days)
how would i call a function with mixed variables from the main().
and how do I initialize them. Should I initialise the variable as a float then convert it to an integer after returning from the function?
And will the same apply in a void function?
void calculateDeterminant(int index){if(index < lowerBoundary || upperBoundary < index)return;// index is out of range, skip the rest of the funtion// rest of function that does stuff}
Hi if you mix variables then use Void function but note void function does not return a value instead can store the value in a variable.
So try it like the one below: