what is 'double' used for?
look at this functon
1 2 3
|
double substract(int num1, int num2){
return num1 + num2;
}
|
what is double used for on that function?
thanks
To return a variable of type double.
Do you know what type double is? it is a floating point type, but with more digits of precision.
the function you posted has no need to be a double. change it to int
int + int = int
Topic archived. No new replies allowed.