define Product (a,b) ((a)*(b))
I assume "a" and "b" is an integer or a real number.
Here are the errors I could think off
If the programmer for some reason and apply string or character or symbol in either "a" or "b", then the program will fail.
If "a" and/or "b" is real number or integer, then we could assume the result of this statement is integer or real number, if the result is integer, integer has range of value (float or double), if the result from actual calculation is more than the range, then the error will occur.
For example, if the result of this statement is 2
"a" = 1
"b" = 2.5
1 x 2.5 = 2.5 (so is not equal to 2, then is false)
Anyone have any more example for this statement?
Aucun commentaire:
Enregistrer un commentaire